Handling Bit Fields
-
I am reading hundreds of data points that consist of 16 bit values. Each 16 bit value consist of 4 nibbles. If the nibble value = 15 it means item not implemented. If it is 1 it means that the value is set, if it is 0 it means the data is not set. For example a 16bit data point will have 4 values be Error|Start|Overheat|Manual. so if Start is not implemented, it will send for example 0000 1111 0001 0001 through or 0F11 hex.How can I put this into 4 Binary data points? We are using SNMP data source, but I have a similar problem with HTTP Receiver.
-
I can't tell you the script to use off hand but you should be able to do this using a Meta Data Point with a script to return the value you want. More info: http://infiniteautomation.com/wiki/doku.php?id=automation:meta_data_points
-
Hi Thanks Joel. Yes the scripting works very easily. I could just not figure out if it is important to make the variable name different for each meta data point. Currently all the meta data points variable name is the same, as I am not using it in the script.
-
It's ok to use the same variable name in multiple meta data points as variable names are isolated to each script and not shared between them.