Crimson 3.1 - Bit of a Word

Bullzi

Lifetime Supporting Member
Join Date
Jun 2012
Location
Colorado
Posts
1,530
Hi everyone,
I am reading a alarm word from a device via Modbus using Crimson. I would like to create a flag tag for each of the 16 bits so I can have separate alarms based on the bits.

Has anyone done that before? I have always had a PLC involved to do this for me so I have never done it with Crimson.

Thanks for any help you can provide!!
 
When you create the flag tag, set the source as "tag" then drag your numeric tag in.
Then you can set the "treat as" parameter as a bit array and set the bit number.

xyz.png
 
You can pick a numeric tag as the data source for another (flag) tag and then treat it as Bit array (usually little endian) and select the bit number. Or you can pick a tag as the data source and append it with ".n" where n is the bit number.

The screenshot is an example where my tag Pump_1.OP is the 16 bit operation status word from a LSIS VFD and all the yellow flag tags point at the OP tag's individual bits.

I happened to use the first method on this one, but I could just have easily put the Source as "OP.0" without the quotes and it works too. The advantage to the latter method in my experience has been with doing tag editing from a csv export, it can be easier to autofill items.

tag bits.png
 
Last edited:
Thanks guys!! I feel kind of stupid, I should have thought of that myself because that is how you have to handle B registers in RsLogix 500. ;)
 

Similar Topics

Happy Friday, I am trying to log scan errors related to Modbus Comms for a G306. I am able to use the system function GetDeviceStatus(x) to...
Replies
4
Views
1,924
I'm getting a error about mapping a bit to a numeric tag and it should be using a flag tag but I am. They even have the little flag icons. ???
Replies
13
Views
4,188
Merry Christmas to everyone!! Working on a prototype system using a Click PLC and a Red Lion G306. I am trying to set a bit in the PLC when I am...
Replies
7
Views
2,098
Hi, Has anybody had any luck running RedLion's Crimson 3.0's Emulator under a 64-bit Windows (7, 8.1 or 10)? Thank you
Replies
6
Views
3,314
Hello all, I wonder if someone might have some insight on how to convert a 16 bit Integer value into an 8 bit array in Crimson 3. Example...
Replies
5
Views
3,455
Back
Top Bottom