08-23-2010 11:41 AM
Hello. First, FWIW, I have zero experience using a network or Modbus. I need to communicate to a Modicon Quantum PLC using the modbus library. Looking at the provided examples of TCP in the library it seems straight forward but I am evidently missing something. It seems regardless of the address I send to the PLC I receive no response. I am using the "MB Ethernet example Master.vi". Since the PLC is currently in operation I deleted the "coils to write" and "registers to write" events from the example since I didn't want to accidently cause any operational problems. That leaves me with the simple 'time out' event executing every 100 ms reading coils and registers. I have the network address of the PLC and using a cross over cable directly from the computer, I can see the tcp receive and send lights flashing on the plc's communiction module as I attempt to read coils or registers. But, I get no visible response written to the slave discrete inputs or the slave input registers arrays on the example front panel. I added a loop to write addresses starting at 0 and let it run up to 12000 with no response. The only documentation that has been provided to me about the PLC is a list of the PLC variable memory addresses. All the addresses are either a 6 digit number starting with 4 (400063) or a 3 digit number such as 299. If I try to send a 6 digit address the example returns an error and sending any other number ,at least up to 12000, gets no visible indication of response in the example. I would appreciate someone cluing me in to what I'm not doing or what I'm doing wrong. Hope the question makes sense. Thanks.
08-24-2010 06:33 PM
I'm a bit confused as to what you are trying to do. From your post it appears as if you are using the MB Ethernet Example Master VI, but are you also using the MB Ethernet Example Slave VI as well? If you are running the Slave VI and update the Discrete Inputs or Input Registers, the Master VI should pick up on that if they are set up correctly. Also, you modified the Master VI, did you also modify the Slave VI?
08-25-2010 08:54 AM
Thanks for replying Stephanie. Sorry my question wasn't really clear. I was frustrated and guess I tried to include too much information. I did finally get it to work, not exactly sure how, but at least I can read and write to the PLC. I was not using the slave example as the PLC is acting as the slave in this instance. On to the next unknown Thanks again.