Hi,
I am using SNPX option (HMI communication) with fanuc. The settings on the system variables are as follows:
$SNPX_PARAM. $MODBUS_ADR = 1
$SNPX_PARAM.$NUM_MODBUS = 2 (someone on the forum pointed out ,that this value should be above '0')
Using SNPX_ASG parameter, I tried to map 15 digital outputs, DO[5] - DO[20] and 20 data registers, R[1] - R[20].
For data registers,
$SNPX_ASG.$ADDRESS = 51
$SNPX_ASG.$SIZE = 40
$SNPX_ASG.$VAR_NAME = R[1]
$SNPX_ASG.$MULTIPLY = 1000
For digital outputs,
$SNPX_ASG.$ADDRESS = 91
$SNPX_ASG.$SIZE = 15
$SNPX_ASG.$VAR_NAME = DO[5]
$SNPX_ASG.$MULTIPLY = 1
I am using pymodbus to read/write the above. I can write to data registers, using the following:
client.write_registers(start_address, payload, skip_encode=True, unit=1)
I use the following to write a DO.
coil_response = client.write_coil(address=93, value=True, unit=1)
But, on TP screen, when I MENU -> I/O -> Digital
DOs are always appearing OFF on TP.
When I read the status for the DO that was just written,
coil_response = client.read_coils(address=93, count=1, unit=DEVICE_ID)
it shows me that it has been 'set'
Why can't I see the changed status of DOs on TP, or are they really changed.
thanks,
Zahid