Welcome, Guest

TOPIC: Code to link status bits to outputs

Code to link status bits to outputs 3 years 9 months ago #1669

  • KCL64
  • KCL64's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 8
  • Karma: 0
Hi can someone suggest what code I would use to link Status bits 12 (Brs) and 13 (Bls)
to an output to signal a solid state relay to trigger a limit fault on my machine.

Thanks
The administrator has disabled public write access.

Re: Code to link status bits to outputs 3 years 9 months ago #1675

  • csearcy
  • csearcy's Avatar
  • OFFLINE
  • Moderator
  • Posts: 459
  • Thank you received: 77
  • Karma: 23
IF B(0,14)|B(0,15) OS(0) ELSE OR(0) ENDIF

NOTE: EDITED FOR TYPO
Last Edit: 3 years 9 months ago by csearcy.
The administrator has disabled public write access.

Re: Code to link status bits to outputs 3 years 9 months ago #1678

  • KCL64
  • KCL64's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 8
  • Karma: 0
Thanks but I'm still having an issue with the above code.
The output I would like to trigger with the Brs and Bls S/W limit switches is (Exp I/O 18)

Tried changing the code around but still no solution yet.
What I have at the moment is

IF(B(1,12)|(B(1,13) OS(17,2)
ENDIF

but I have an invalid expression term in it.

Any idea's Thanks Kent.
The administrator has disabled public write access.

Re: Code to link status bits to outputs 3 years 9 months ago #1679

  • csearcy
  • csearcy's Avatar
  • OFFLINE
  • Moderator
  • Posts: 459
  • Thank you received: 77
  • Karma: 23
Sorry Kent... I had a typo in the previous post. The following should work ok.

WHILE 1
IF B(0,14)| B(0,15) OS(17) ELSE OR(17) ENDIF
LOOP
END
The administrator has disabled public write access.
Moderators: hsummer, csearcy, swalters, mmeyers
Time to create page: 0.241 seconds
Powered by Kunena Forum