PDA

View Full Version : Process Gateway - Modbus slave - Addressing details



saravanan1985
7th February 2017, 18:32
Hi All,

Is it possible to configure 10 Inputs with register address as 2100(example) with bit reference varying from 1 to 10. If Yes where to feed those bit reference in process gateway.

1996

Thanks

regards

saro

ursulak
8th February 2017, 09:25
The addressing area of holding registers in a MODBUS protocol bases on WORD. Thus one offset in Process Gateway MODBUS Slave responds in zenon one variable, best choice INT or UINT.
You may calculate the value of the variable from values of few other BOOL variables using VBA (then store result in an Internal variable) or zenon Logic (then for result use stratonNG variable).

saravanan1985
14th February 2017, 18:54
Thanks ursulak.

I gone for zenon logic.

ursulak
16th February 2017, 09:41
zenon Logic supports access to single bits of variables. Thus to change the value of particular bit of an numerical stratonNG variable you may use following ST-language syntax:

myResult.0 := G202_B213_ALG15; //lowest bit

assuming that G202_B213_ALG15 is your process variable in zenon, with data type BOOL and set to be 'external visible'.
And do not forget to create in Logic the 'Logic to SCADA connection' fieldbus driver.