Jump to content

COM1 port on Vision PLCs - RS485 working or not?


Recommended Posts

Few days ago I had this happen to me a second time: Vision RS-485 doesn't seem to work on COM1 port.

First time it was a V570. I connected COM1 port to a VFD using RS-485 pins 1 and 6 on 6P6C connector. Speed was 9600 bps. The communication didn't work. It started working when I connected it to COM2 port.

Second time it was a V700. I connected COM1 port to several transmitters using Modbus RTU. Speed was 9600 bps. Nothing worked. The problem was not in the software, because I connected COM1 port using RS-232 to my PC with a Modbus slave simulator, and Modbus comms worked perfectly fine over RS-232. So definitely it's something in the port hardware or in the OS of Visions.

I've checked the DIP switches, and tried both termination on and off. Total cable length doesn't exceed 1 meter. I've tried with external 120 ohm termination resistors on and off. Double checked port initialization, nothing. Nothing made RS-485 work on COM1 port.

COM2 add-on port work fine with RS-485.

What could I be doing wrong? Has anyone else had a similar problem? What could be the workaround? Maybe the 9600bps is too high speed?

Link to comment
Share on other sites

  • MVP 2023

First of all, I think you probably know that working with visilogic over port1 disables port1 from working over other protocols.

Even when using the USB port, we must remember that it is still a busy port1 (but through the USB - COM adapter in the PLC).

The second point - for communications with the outside world, it is necessary to take into account the galvanic separation of the port and the common grounding of the devices. A high potential between two devices connected to the rs485 network can destroy the receiver-transmitter of the signal, which is not galvanically isolated.

Therefore, I practice to always use the isolated version of the rs485 port card for communication with external devices.

 

P/S. As a hardware check, you can compare the RS485 outputs pin of the connection of the working and non-working ports relative to the common point (GND for RS232) using the tester.

  • Upvote 1
Link to comment
Share on other sites

I am debugging COM1 port while being connected to Vision PLC over Ethernet. So it should not interfere.

The devices that Vision is talking to are no more than 0.5 meter distance from it. They are powered by same +24V supply as the PLC. So there should be no separate grounds or high voltage potentials. I have even tried taking GND pin of Vision COM1 port and connecting it to GND pin of the device, and still nothing.

I do have capabilities to debug this on electrical level (oscilloscope, logic probe), but I thought that maybe there are some tips or undocumented stuff about COM1 port, before succumbing myself from system integrator to hardware hacker mode.

Link to comment
Share on other sites

  • MVP 2023

Could you please put up screenshots of your ComInits, for both 1 & 2.  And in doing this, you might find a teensy weeny little thing that is the issue!  That's what I find when I'm finally asking about a frustrating question...the typo suddenly stares me in the face, saying "Here I am...I've been waving at you all day!"

I am suspecting that perhaps your timeouts on 1 are shorter than on 2.  What do the status bits on using both ports say when trying things?

As well, you say 

On 4/29/2024 at 3:20 AM, kvlada said:

Modbus comms worked perfectly fine over RS-232

yet you are doing 485 on the plc, which at the speed you have is not a fast process and allowances have to be made accordingly.  But also please explain the "232" setup. 

cheers, Aus

Link to comment
Share on other sites

20 hours ago, Ausman said:

Could you please put up screenshots of your ComInits, for both 1 & 2

Here!

1.png.9be4e8023803e43bfd11e3974bb5a211.png 2.png.3d181beb451dca6e1623e6256bc38381.png  3.png.068b6626afe243417f5e6a2bbad0a28f.png

I am using COM1 for Modbus, and COM2 is unused at the moment (no serial port card) but I've initialized it.

20 hours ago, Ausman said:

yet you are doing 485 on the plc, which at the speed you have is not a fast process and allowances have to be made accordingly.  But also please explain the "232" setup. 

So, I connect a RJ11 (6P6C) cable to a SUB-D9 adapter and then to a USB-to-Serial adapter and to PC. This works because Vision serial ports enable RS-232 signals even if port is initialized in software as RS-485.

On the PC I use these two software to test out the Modbus:

1. Modbus Slave by Witte Software

2. pyModSlave - free

They both work fine, and I've been able to simulate Modbus traffic over COM2 and TCP/IP, with my PC acting as a slave device.

 

 

Link to comment
Share on other sites

  • MVP 2023

I would be increasing your timeout in the ComInit to a few seconds, and also match your D10 to that amount.  D10 & D2 are not shown here, but shift timeouts upwards and no retries to see if things work.  If that then works, decrease your timeouts appropriately so that things are stable.  Many people here do no retries at all, on the grounds that if it doesn't work, check it again in the next few lots of reads. 

However, I still wonder at your methods of testing.  You may actually be using the 232 system, instead of the 485 pins on 1 & 6.  Kratmel's ask is relevant...screenshots?

Also, try changing your network ID to a number higher than 1 that isn't a number elsewhere in your network. 

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...