Jump to content

Recommended Posts

Posted

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?

  • MVP 2023
Posted

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
Posted

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.

  • MVP 2023
Posted

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

  • MVP 2023
Posted
On 4/28/2024 at 8:20 PM, kvlada said:

The problem was not in the software,

Please check port1 1-6 pin PLC inside connector.

Please post foto from PLC Info Mode about port1 configuration.

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

 

 

  • MVP 2023
Posted

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. 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.