I am having a frame of data type word and I want to create alarms for each bit of a word address. How to extract bits from a word data type and create alarms for extracted bits data type?
In this case, you need to use the byte offset property to do the mapping from the Word.
For your information, register and text variables it is determined by the Byte offset property. For bits both the Byte offset and Bit offset properties are used.
For registers and text variables the byte offset is calculated as the position of the item in the frame (starting at 0) multiplied by the number of bytes dictated by the format. For example if you wanted the tenth item (position = 9) and you were using a 16 bit integer format the byte offset would be 18.
For bit variables the byte offset is the calculated as the bit position (starting at 0) divide by 8. The bit offset is the bit position minus the byte offset multiplied by 8. For example if you wanted the fourteenth bit (position = 13) the byte offset would be 1 and the bit offset 5.
If you want to do the word bit mapping, there is two ways : -
- 1st you can mapped directly at the variable, through source option of the variable. And apply the proper bit offset for each variable.
OR
- 2nd do it the in the excel - varexp


