Matching Serial Port Parameters on SG3 and SG4 PLCs

Hello

I have a plant with mixed B&R PLCs (SG3 and SG4) exchanging data over Rs485 serial interfaces.
On SG3 IF321 and on SG4 X20 IF1030 is used.
SG3 runs on OS V2.2, SG4 on newest AR R4.93.
On both PLC generations the frame driver is used to access the serial interface.
Now the parameters set on SG3 are not as detailed as on SG4 and I wonder if there is a matching set which allows low errors on the bus.
The parameters used on SG3 are 115200B, 8, 1, N, 0x0a as delimiter.
The parameters used on SG4 are "/PHY=RS485 /BD=115200 /DB=8 /SB=1 /PA=N /RIT=4 /TIT=5 /CCHAR1=0x0a /TEMTS=1 /FCCTS=0 /FCSW=0 /RTSTX=0”.

Now as on SG3 side there is no “RIT” and no “TIT” to set, I ask if there a best practice value to put.

Thanks and best wishes
Valerio

Hi @Valerio.Plozner ,

You have on SG3 OS V2.2

I suspect that with newer AR even on SG3 we define the mode in the same way

You are using quite old system 2003 and I don’t see useful information on AS 4 Help.
Which library and function are you using on your SG3 system? Based on DVFrame system requirements (found on AS 3 Help) your automation runtime V2.2 supports the library, so I think you are using the FRM_xopen() function block

It’s also possible on SG3 all options are not available.
Thanks
Ciao
Valerio

In the AS 3.0.90 Help the old settings are still described at the FRM_xopen() function block:

1 Like

Hi Valerio

Thanks for the quick response.
The SG3 Source is still on PG2000 level, so the list of parameters is limited to:
$000A4032, ; (1 LONG) Delim (1 Delim, LF, 50 Zeichen)
1152, ; (1 WORD) Baud (115’200)
$00020101, ; (1 LONG) Mode (No Handshake, RS485, 8 Databits, 1 Stopbit, No Parity)
0004, ; (1 WORD) RxBufCnt
0001, ; (1 WORD) TxBufCnt
0200, ; (1 WORD) RxBufLen
0200, ; (1 WORD) TxBufLen
$00000000, ; (1 LONG) ArgInfo

So I don’t have much room to maneuver here.

Best wishes
Valerio

Thank you for the quick reponse Corne,

Unfortunately, I’m still stuck on PG2000 Source…

Best wishes
Valerio

What you are mentioning is the config structure.

What I was mentioning is the mode parameter of the FRM_xopen function.
I believe that in PG2000 the FRM_xopen function also has a device, mode and a config input.
DVFrame.pdf (128.1 KB)

The parameters on SG3 are running since 25 years with:
$000A4032, ; (1 LONG) Delim (1 Delim, LF, 50 Zeichen)
1152, ; (1 WORD) Baud (115’200)
$00020101, ; (1 LONG) Mode (No Handshake, RS485, 8 Databits, 1 Stopbit, No Parity)
0004, ; (1 WORD) RxBufCnt
0001, ; (1 WORD) TxBufCnt
0200, ; (1 WORD) RxBufLen
0200, ; (1 WORD) TxBufLen
$00000000, ; (1 LONG) ArgInfo

And it seams that a new SG4 slave with parameters:
"/PHY=RS485 /BD=115200 /DB=8 /SB=1 /PA=N /RIT=4 /TIT=5 /CCHAR1=0x0a /TEMTS=1 /FCCTS=0 /FCSW=0 /RTSTX=0 "

is sometimes having problems so that it looses characters and thus having frame errors.

The sniffing of the bus is showing, that the messages on the bus are seaminly correct, but the SG4 slave is not getting the same string.

An example:
The Bus-Master detects on the bus: “01021AW0B600102148C”
The SG4 slave detects on the bus: “8C” or “600102148C”
And after some time the SG4 slave is on track again, thus detects “01021AW0B600102148C” on the bus.
The sniffing of the bus shows the full message, thus the same as master.

I reduced the complexity of the system by having only a Bus-Master and one SG3 Slave and one SG4 Slave (in the full configuration I have 15 SG3 slaves).

My feeling is, that the parameter RIT or TIT are involved here…

Which hardware is used in SG4?

X20CP1585 or X20CP1584 as Master
X20CP3685 or X20CP0848 as Slave
always with x20IF1030 as Interface

Hi,

as you’re using a control character as frame delimiter (0x0a), on the SG4 side I would try to increase the the receive idle time (RIT) from 4 to something much higher like 40 or so to check, if something changes / to prove if RIT interferes with CCHAR when ending the frame.

Best regards.

Thanks for the suggestion, but the behavior is more or less equal.

After many attempts, it seems that the best results are achieved with TIT=0.

What is your total cable length?
Have you tried a lower baud rate?

The physical context should not be the problem as:

  1. on the plant it was running for 29 years with SG3 (length more or less 90m).
  2. on the table here I have the same effect with ca. 3 m length.
  3. on the table I replaced/rewired the cable.

The terminators are placed (62 Ohm).

Now I opened a support ticket…