Click PLC set bit function?

Sprayman

Member
Join Date
Jan 2020
Location
Chicago
Posts
50
Hi all,

Another odd question for you guys,

Looking to try and set multiple bits to a single word register.

Some context, I am using a Delta HMI and it has an alarm table. To use the alarm table it reads from a single word register. Previously, I would use a function called Bit Set on my delta PLC to set a bit to this register. This allowed me set up to 16 alarms on the one register.

As far as i can see there is no way to do this on the click plc... or is there?

basically what i need to do is to be able to set each bit of the register on or off. any thoughts?
 
if you have bit-wise logical operators, then

  • word AND 0xFF7F
    • Clears bit 7 of word
  • word OR 0x0080
    • Sets bit 7 of word
Caveat: 0x is the prefix for a hexadecimal constant; I dunno how Click actually does hex constants (ff7fH would be AB-style).
 
Last edited:
The Click PLC doesn't have a way to give you direct access to individual bits in a word address, but there is a pretty easy way to do it with an additional step.

Let's say you have your PLC logic set up to write to bits C100 through C115 as your 16 alarm bits.

Then use a Copy instruction set for "Pack Copy" mode, and pick the source bit range of C100 to C115 and the Destination as DS100, then point the Delta HMI at DS100, that should give you the same effect.
 

Similar Topics

Complete noob here, using a Click C0-02DD1-D to run a test stand. Requirement is to turn on motor run for X seconds, turn off and dwell for X...
Replies
6
Views
1,085
Hi All I'm trying to add an analog input module to my Click plc to attach some potentiometers to. I can't seem to get any data in my system...
Replies
5
Views
1,992
merry christmas and happy new year i have a click c0-00dr-d and allen bradley 2711c-t3m. can the panelview talk to the click plc via modbus...
Replies
1
Views
219
Hi guys, i have never had to do a PWM Output or input before i have a Device that to dimm the lamp output from the ballast, the ballast has a 24V...
Replies
6
Views
1,049
I am trying to set a bit to command the Zebra ZT230 to print a label and receive a confirmation bit from the unit via an Automation Direct Click...
Replies
0
Views
670
Back
Top Bottom