Hi Leon,
I connected the rs485- optic fiber converter, that you check. I have this funtion.
'Map Relay 33-48 from Slave#2 (MO#3) to Relay 1-16 in Master
'-----------------------------------------------------------
C$ = NETCMD$(3,"@02RR04") 'Read Slave#2 relays 33-40
IF LEN(C$)=0 RETURN: ENDIF 'Not getting response
DM[100]=HEXVAL(MID$(C$,6,2)) 'Keep the value temporarily.
C$ = NETCMD$(3,"@02RR05") 'Read Slave#2 relays 41-48
IF LEN(C$)=0 RETURN: ENDIF 'Not getting response
DM[101]=HEXVAL(MID$(C$,6,2)) 'Keep the value temporarily.
RELAY[1]= (DM[101]*256)+DM[100]
But it doesn't change the status of the relay 1 at the master. When I monitor the master PLC, at the variable c$ some time shows me values like @02R004.
and the dm[100] sometimes change the value such as -6,4,-48.
I don't know how to solve this problem.
Philip