I'm having so much fun with one Nano-10 that I got another one. Actually, I need a third analog input and everything I read says it is so easy to have the two plc's talk to each other. Not so much for me! What I've got so far is: nano1 and nano2 up and running and wired together via the RS485 ports with about 18" of twisted pair, negative to negative and positive to positive. They are also both hooked up to a wireless router via the RJ45 ports, but with no internet. The router is at 192.168.2.1, nano1 is at 192.168.2.5:9080, ID 01, and nano2 is at 192.168.2.6:9080, ID 02. They both use a common NPN proximity sensor to control input2 on each plc (could this be a problem?)
The programming for nano2 is that when input2 is on, it does a custom function that is:
M= ADC(1) REM read moisture
Input[10] = M REM store moisture
N=Input[10] REM for testing
This seems to work when viewed with TRiLOGI. There is no setup routine (yet).
The programming for nano1 is that when input2 is on, it also does a custom function which is longer, but ends with:
REM hyd pressure test
P = ADC(1) REM hyd pressure
DM[3879] = P
W = ADC(2) REM scale pressure
REM go get moisture
M=READMODBUS(3,2,10) (as per Modbus.PC6 sample program)
When viewed with TRiLOGI, P and W change as expected, but M stays at zero. There is a setup routine for this nano, but nothing with SETSYSTEM or SETPROTOCOL.
My TRiLOGI manual shows the syntax as SETSYSTEM n,data - with the choices for n being 1,2,or 3 and the choices for data being 4,5,6,8, and 256. The user's manual for the Nano-10 shows an examples of SETSYSTEM 19,0 (page 14-6), SETSYSTEM 253,n (page 12-5), and I'm sure I've seen SETSYSTEM 20,?? somewhere, but with so little information, I don't dare play with that.
I think that I want to use the RS485 port (COMM1?) but believe that the NETCMD$ function would also work. If possible, could someone please show programming for both methods.
Thanks