I am trying to interface a Teco SG2-20VR-D (user manual here: http://www.bb-elec.com/bb-elec/literature/manuals/SG2PLR_UserManual_0707m.pdf and modbus manual here: http://www.bb-elec.com/bb-elec/literature/manuals/SG2_V-typeModbusProtocol_0807.pdf) with Mach3.
Here is what I've done so far:
* Configured the unit to have slave address "02" using the "LAD Version 1.9" using the RS-232 interface (separate from 485)
* Installed 120ohm resistors on the 485 line
* Configured a USB to 485 adapter to COM6
* Under the "Modbus Confugration" screen, Port Num: 6, Baud Rate: 38400 8-2-N, Do NOT use RTS for transmit, Timout of 1500ms
* Click the "Test Modbus" button
* Port Num: 6 and Baud Rate: 38400, Slave Addr: 2, Start: 100 (hex), Num Regs:1, input registers
* Click "Open" and it responds "No error"
Here are my questions:
* Why is there no option for stop, parity and data bits on the "ModBus Serial Control Monitor" page?
* Why would you need to re-enter Port Number and Baud Rate again on the monitor page if it's on the Configuration page?
* What does the slider bar under Discrete Input(s) do?
* What is occuring when you click "Report Slave ID" and "Read Excp Stat" buttons? When clicking "Report Slave ID" mach3 returns "receive timeout".
* Why do I get "CRC Error" when I attempt to read?
* Is there a difference between slave address "1" and "01"?
* My PLC uses RTU, not ASCII - is Mach3 using RTU or ASCII? Is it configurable?
* Is there any simple way to peek at the data on the 485 serial line?
On a side note... I've watched the modbus videos and read everything I could find on the mach site with the word "modbus".
Thanks!
Hi,
The answer to your questions;
* Why is there no option for stop, parity and data bits on the "ModBus Serial Control Monitor" page?
- It is on the previous setup page.
* Why would you need to re-enter Port Number and Baud Rate again on the monitor page if it's on the Configuration page?
- Decause that's the way it is.
The page is probably copied from an appication supplied by the Modbus library provider,
* What does the slider bar under Discrete Input(s) do?
- It allows you to continuously read the data, instad of having to press the read button. The further to the right it is the fast uit reads.
* What is occuring when you click "Report Slave ID" and "Read Excp Stat" buttons? When clicking "Report Slave ID" mach3 returns "receive timeout".
- It is sending the Modbus command Report Slave ID. Your device does not implement it, so it does not respond, hence the timeout.
* Why do I get "CRC Error" when I attempt to read?
- Excellent question. This is the cause of your problem most likely.
* Is there a difference between slave address "1" and "01"?
- No.
* My PLC uses RTU, not ASCII - is Mach3 using RTU or ASCII? Is it configurable?
- Mach is only RTU. Does not do ASCII
* Is there any simple way to peek at the data on the 485 serial line?
- Not really. What you could do is download the trial version of Modbus Poll and try to use that to talk to your devicce. It can display what is being received and may help in solving your problem.
Cheers,
Peter.