Jump to content

Recommended Posts

Hi at all,

I'm new here but used the forum some times to find a solution for problems I had.

Now I have to ask directly because I can't find any help regarding my problem.

The general question is: What is the difference between a PLC ID I set up with the "PLC NET ID" function and a Net ID I set up e.g. for ModBus communication?

Background is:

I have a V260 with an additional 3rd port for RS485 (Init function: Com3; 9600 baudrate; TimeOut1.5 sec; Databits 8, Pritiy none; Stopbits 1; STandard: RS485) . I intialize it to function as ModBus (Modbus config function: Port 3; Net ID 1; Timeout 150 ms; Retries 3). I have 3 slave devices.

I communicate to each slave with a different ID (3, 4 and 5) and with different lenghts of messages, worked through via datatable where al necessary information are saved. Interresting thing: as long as I only go through the read registers of the datatable, everything is fine. But when I send a command to a write register, the slave receives the message and I have a communication error for approx. 45 sec (status messages read show "4" or "5").

So, regarding the error messages I tried experimenting with the settings (higher baudrate, other parity, different amount of stopbits, changing timeout), but it got even worse. I went back to "original settings" and started to search the www for infos concerning ModBus (as I am really not familiar with it).

I found a tip changing to 2 stopbits for parity none and 1 stopbit for parity even, no difference at all.

Then, while reading the help, it came to my attention, that there was described that the PLC Net ID should be 64 or higher to suit a RS485 connection. Has this something to do with my modbus communication ? If yes, in which way? Are there recommendations from your side concerning the "flow control" and "ignore break" options in COM INIT FB ??

Thanks for all of your help. If you need to know anything else, ask please.

Best regards, FireNeck

P.S.: The wiring is done with a suitable cable for ModBus, the devices are daisy-chain-linked, the order is "Slave 3 - PLC - Slave 1 - Slave 2" and the resistors are in at Slave 3 and Slave 2, the PLC Com Port is set to RS485 without termination. A special thing to mention is that the slaves are MOXA Modbus Translators, because with each Moxa there is a generator connected which only can be controlled remotely with RS232 commands and the Moxa is the translator between Modbus and RS232.

Link to comment
Share on other sites

Hi,

MODBUS ID is the identification for the communication between the PLC and other devices which use MODBUS protocol.

Possible values for MODBUS ID are 1-255.

Network ID is for P-COM communication over RS485 and CANBUS.

Typical values are 1-63 for CANBUS and 64-127 for RS485.

If you can read via MODBUS it means that the communication is ok.

The problem you encounter is probably a result of a wrong MODBUS command, or a wrong

register address in the slave.

Please make sure you are using the command correctly and verify in the slave addressing of the device that you are using the correct address.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...