Help connecting to a Micro820 via onboard RS232 from Desktop computer

plcnoop

Member
Join Date
Jun 2019
Location
US
Posts
15
I have a Micro820 here that will eventually be used as a slave device and will have information pulled from it serially. I need to test the Micro820 with Modbus Poll or similar software (that simulates a master device) to make sure this will work.


In order to do this I am using my desktop computer, a USB > DB9 and then wiring straight into the onboard serial RS232 terminals on the PLC.


Basically, I'm following this guide here, and it should be noted that I've tried two different cables (one of which I've confirmed works for LOI connection to a different PLC, and the other that's brand new):


https://mburdis.neocities.org/Notes/Micro820/Getting_started_with_the_Micro820.html


My problems begin when it comes to configuring the drivers for the device. Auto-configure elicits an error response:

https://i.imgur.com/J0heTmq.png

Even when I set this up manually, to match the settings in device manager and CCW (matching the baud, parity, etc), I get a timeout error in Modbus Poll and any other Modbus master simulation software.

I don't know where to go from here honestly and I'm just at a complete loss. Been fighting this for two days now and any help is super appreciated. I'm completely new to this and could use any insight.

Thanks ahead of time.
 
Welcome to the PLCTalk forum community !

Step 1 is to set aside RSLinx Classic's DF1 Full Duplex driver. It's going to compete with Modbus Poll for the resources of your USB/Serial device, and it's unnecessary to communicate with the Micro 820 because you've got onboard

The Autoconfigure feature of that driver does not work with some cheap USB/Serial devices, so I don't rely on it when I'm using DF1 Full Duplex protocol.

And of course it wouldn't work if you have configured the port for Modbus RTU Slave protocol, since DF1 and Modbus RTU have entirely different command codes and data frames.

Step 2 is to examine your settings in CCW for the serial port. This is an RS-232 connection you're testing, so be sure it's not set for RS485. Examine the Modbus RTU serial framing (usually 19200, 8 data bits, no parity, one stop bit) and the Modbus mapping to the Micro 820's data tags.

Does your USB/serial converter have any traffic/activity indicator LEDs ? What happens when you set up your Modbus Poll utility ? And which Modbus Poll utility are you using ? I like ModScan32 and the tools from Chipkin Automation Systems.


Again, welcome to the PLCTalk forum !
 
Welcome to the PLCTalk forum community !

Step 1 is to set aside RSLinx Classic's DF1 Full Duplex driver. It's going to compete with Modbus Poll for the resources of your USB/Serial device, and it's unnecessary to communicate with the Micro 820 because you've got onboard

The Autoconfigure feature of that driver does not work with some cheap USB/Serial devices, so I don't rely on it when I'm using DF1 Full Duplex protocol.

And of course it wouldn't work if you have configured the port for Modbus RTU Slave protocol, since DF1 and Modbus RTU have entirely different command codes and data frames.

Step 2 is to examine your settings in CCW for the serial port. This is an RS-232 connection you're testing, so be sure it's not set for RS485. Examine the Modbus RTU serial framing (usually 19200, 8 data bits, no parity, one stop bit) and the Modbus mapping to the Micro 820's data tags.

Does your USB/serial converter have any traffic/activity indicator LEDs ? What happens when you set up your Modbus Poll utility ? And which Modbus Poll utility are you using ? I like ModScan32 and the tools from Chipkin Automation Systems.


Again, welcome to the PLCTalk forum !


Thank you, thank you, thank you. Lots of good info here. I was starting to panic when a second cable wouldn't auto-configure in RSLinx.


I have the Serial Port in CCW configured properly (just got off the phone with Rockwell to confirm that, they weren't any help with Modbus Poll and I guess I don't blame them, not their job).


I have the device configured in Device manager, CCW, and Modbus Poll all at the same baud, parity, data/stop bits.

The modbus address I'm trying to read is this, which was auto-mapped by CCW. It's a temperature value that's produced from a Thermistor function block I made.



https://i.imgur.com/BeSyrP3.png


I also have Modscan32 so if you don't mind maybe you could walk me through how I'd set it up to attempt to read this value?


https://i.imgur.com/6sDSkqK.png

That's what I see when using Modscan, it will alternate between time out and that error message basically.
 
Get RealTerm so you can see what, if anything, is hitting the wires. You can also manually create a Modbus RTU frame to request a value so you know for a fact the proper command went out and what came back.
 
There's no such thing as a dumb question if you learn from the answer.


I think there are two separate problems you're seeing: the length of the Modbus data table emulated by the Micro 820, and the conflict between the tools you are using on your PC.


Unlike Ethernet and the TCP/IP protocol stack, COM port resources in any operating system cannot be shared among different applications. You need to be sure that only one serial application (ModScan, RSLinx, Chipkin) is running at a time and using that COM4 resource.

RSLinx can be especially tricky because it can run in the background as a service, happily keeping COM4 to itself. Delete the DF1 Full Duplex driver, or make sure you "Exit and Shutdown" from the RSLinx top level menu, instead of just clicking the X and letting it hide in the system tray.

The COM port resource conflict is what's probably causing the Chipkin tool to give you the "Could not connect to COM4" error message.


Modscan is also giving you a hint, but not the same one: it says "Exception Response from Slave Device", not "Timeout" or "No Response from Slave Device".

The Micro 820 does not have an unlimited amount of Modbus data table memory reserved. You're polling for 100 registers, but only two registers (40001 and 40002) are likely created and available.

Set Modscan for just two Holding registers and give it a try, and then we'll start discussing how Floating Point values are encoded and transmitted over Modbus.
 
Sweet; the Chipkin shows you the raw hex data going from your PC to the Micro 820, and the raw hex data in the response.

In a few days you're gonna be so good at this you can decode it by sight.

You can see the symmetry in the command and response:

01 03 00 00 00 0A C5 CD
01 83


The "83" in the response means "error processing function code 03".

It's very likely because you asked for 10 registers, and it only has 2 registers configured.

Reconfigure Chipkin for 2 registers starting at "40001" and poll again.
 
Thanks for providing those screenshots, by the way. You can generally click the "Attach Files" button and attach your PNG or BMP files directly to your post so that users don't have to jump out to the imgur host.

Generally the pics will show in your post, at least I know they do if they're BMP or PNG and you only attach one.

I'm interested to see the next result, since the Micro 820 should have replied with five bytes, not two: the proper reply for "you requested 10 data registers but I only have 2 defined" would be an "Illegal Address" response, with an error code of 0x02 followed by a two-byte CRC checksum.

01 83 02 C0 F1
 
Huh, very confused now. I changed the parameters in Chipkin to this:
ql5X2Xr.png



But now I back to it just sitting there saying "Starting up..."


I didn't change anything other than I realized RSLogix has to be running for CCW to be running since I'm connected to the PLC via Ethernet from this computer. Terminating RSLogix terminates my connection with the PLC. Although I did remove the driver I created for the serial so it shouldn't be conflicting with CAS.


Even then I should also be able to unplug the ethernet completely with the PLC in run mode and communicate serially. Not sure what changed to where I'm now just getting no information again.
 
If your software is just spinning its wheels, reboot and try again. There are plenty of practical considerations that don't just apply to Rockwell products or serial communications.

RSLinx Classic is the driver set that allows any Rockwell software product to talk to controllers or drives. CCW uses it, DriveTools uses it, RSLogix 5/500/5000 uses it. Just delete the DF1 Full Duplex driver and it won't compete with any of your other serial programs.
 
Yeah I deleted the device driver. Only one I have in there still is the Ethernet one I set up to communicate with the PLC through CCW for uploading projects.


Don't know what happened to end up back at square one with the timeout messages.
 
Ordinarily, the Chipkin Modbus Poll tool shows the newest events at the top:


[14:02:13] Ready...
[14:02:13] Settings file: [C:\Users\Controls\Documents\CAS Modbus Scanner\Settings.xml]
[14:02:13] Debug file: [C:\Users\Controls\Documents\CAS Modbus Scanner\Debuglog.txt]
[14:02:13] Starting up...

The Chipkin tool requires you to Select the task you want to execute and click the Poll button every time you want to send a message. It's not an automatic polling and data display like ModScan is.

If it never accesses the Debug or Settings files are says it's "Ready...", I would uninstall and reinstall it.

And of course check ModScan to see what it does (with Chipkin shut down !)
 
Sorry I couldn't get back to you yesterday, had already left the office.


So I decided to pick up an expanded comm port for this PLC this morning. Plugged it in, wired it up, ran CAS, and boom.


XujyEie.png





That float32 is the thermistor global value that we're trying to pull from our master device. I guess the onboard comm module was bad? I honestly have no idea otherwise.


Either way, you've been a massive help and you're doing a great thing here. People like you are a blessing, really. Taking time out of your day to help is super commendable. If you're ever in south Texas, I owe you a beer.
 

Similar Topics

Hello all, hope your week is going well. I am currently working on debugging a Micro850 with Category number 2080-LC50-24QWB. When I connect...
Replies
8
Views
2,298
Hi all Has anyone connected a baumer verisens vision to a tia I have set up the gsd file and have added the verisens to the network On setting...
Replies
4
Views
3,041
Dear all, In a previous post I asked if someone had the software for an old Taian TP02. We used to sell our bandsaw machines with these PLCs a...
Replies
7
Views
2,738
Hello all. I have to connect to a Siemens S7-200 CPU 224-XP using a serial connection with DB9 to USB converter. The converter is connected and...
Replies
12
Views
3,360
Hello, I have some EVAP units that use an an OPTO 22 SNAP-PAC-EB2 Brain to control I/O. I downloaded the latest basic software package from OPTO...
Replies
0
Views
1,691
Back
Top Bottom