How to read Modbus RS485 on plc

hello,
Yes they are shorted together

Hello

I’m working on the same topic—I have n Socomec meters connected in “RS485” series, and I’m going to use the Wago 750-1652 card to read the various values.

I found this tutorial that might help us; on my end I still get a read error and I don’t know why, even though I followed the video closely.

Wago 750-8212 Modbus RTU Master \u0026 Third Party slave in Codesys 3.5

Feel free to get back to me if you’ve made any progress on the topic.

You can also do settings of the IO card with the WAGO IO-check software.

Maybe this can be checked also.

This is how I did it with a VEGA sensor:

Variables:

FbMbMasterSerial_Vega: WagoAppPlcModbus.FbMbMasterSerial := ( xConnect := TRUE,
udiBaudrate := 9600,
usiDataBits := 8,
eParity := WagoTypesCom.eTTYParity.None,
eStopBits := WagoTypesCom.eTTYStopBits.One,
eHandshake := WagoTypesCom.eTTYHandshake.None,
ePhysical := WagoTypesCom.eTTYPhysicalLayer.RS485_HalfDuplex,
eFrameType := eMbFrameType.RTU,
tTimeOut := T#200MS
);;

utQueryVEGA : typMbQuery := ( bUnitId := 246, // Slaveaddress
bFunctionCode := 16#04, // read input registers

uiReadAddress := 1300, // Startaddress
uiReadQuantity := 11, // Quantity of wanted registers
uiWriteAddress := 0, // not needed for FC4
uiWriteQuantity := 0, // not needed for FC4
awWriteData := [124(0)] // not needed for FC4
);

xTxTriggerVEGA      : BOOL;             (* Set this variable once for start a job.
                                       This variable will be automaticly reset by the master
                                       if the job is done.
                                    *)

utResponseVEGA      : typMbResponse;    (* After the job is done you can find at this structure
                                       the result.
                                    *)

Yes they are still connected as the picture, the total resistance is 60 ohm

Normally I would try now to check the communication with an USB-RS485 adaptor and a PC.

First, if the meter is responding to request wit programs like modbus poll or qmodmaster.

Then, if the PLC is sending requests. For this only a terminal program with ability to show hex data, e.g. realterm, is required. Also if the meter is responding to the request you can see then.

Some meters have a time limit for requests, between requests have to be several seconds.

Okay thank you for your help Thruser, I will check this

Does this mean that the connection is established ?

Is the ground necessary ?

I have “error time out” uid:153

Also, I have these symptoms on the module :

  • The C / Rx LED is off

  • The B LED is yellow

  • The E yellow LED indicates RS-422 duplex mode

Hi, you have to use half duplex mode, not full duplex, as you have only two wires. Modbus RTU with RS-485 is normally half duplex. That I have missed.

1 Like

Hello,

For the 750-1652 card, we agree that there’s no need to add resistors, as they are internal. Similarly, for wiring, there’s no need to make a connection between pin 1 and pin 3 (same for pins 5 and 6).

Thank you in advance.

Hi,

According to the manual it is possible to activate an internal termination resistor and/or BIAS resistors.

This has to be done via WAGO I/O Check. It seems you can also set this within program code

For half duplex mode the connection between RX and TX pins should be internally made, so no external wiring is required.

1 Like

Had the same issue, I used code code to read out the data instead of a modbus device.
Pins 1 and 2 and pins 5 and 6 need to be connected.