station2station
Member
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 return a binary or hex value that I can reference against the below info, but I would really like to just return nth bits from the integer returned... I can't seem to find a function in the manual that works. Any thoughts on how to bitmask/map or get_bit for this?
I see there is a TREAT AS feature for a tag, but it is grayed out when I reference a tag of any kind.
VALUE DESCRIPTION
0 - The device comms is initializing.
1 - The device comms is operating correctly.
2 - The device comms has one or more soft errors.
3 - The device comms has encountered a fatal error.
The following hexadecimal values encode further information about the device…
VALUE DESCRIPTION
0x0010 - At least one error exists in the automatic comms blocks.
0x0020 - At least one error exists in the gateway comms blocks.
0x0040 - Communications to this device are suspended.
0x0100 - Some level of response has been received from the device.
0x0200 - Some form of error has occurred during communications.
0x1000 - The primary write queue is nearly full.
0x2000 - The secondary write queue is nearly full.
Thank you for your time
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 return a binary or hex value that I can reference against the below info, but I would really like to just return nth bits from the integer returned... I can't seem to find a function in the manual that works. Any thoughts on how to bitmask/map or get_bit for this?
I see there is a TREAT AS feature for a tag, but it is grayed out when I reference a tag of any kind.
VALUE DESCRIPTION
0 - The device comms is initializing.
1 - The device comms is operating correctly.
2 - The device comms has one or more soft errors.
3 - The device comms has encountered a fatal error.
The following hexadecimal values encode further information about the device…
VALUE DESCRIPTION
0x0010 - At least one error exists in the automatic comms blocks.
0x0020 - At least one error exists in the gateway comms blocks.
0x0040 - Communications to this device are suspended.
0x0100 - Some level of response has been received from the device.
0x0200 - Some form of error has occurred during communications.
0x1000 - The primary write queue is nearly full.
0x2000 - The secondary write queue is nearly full.
Thank you for your time