Basic Serial Communication using GRV-CSERI-4

Hello,

I am a new user to PAC Control and am still learning.

My task is to communicate two GRV-CSERI-4 modules using RS-485 using transmit string and receive string commands. This is a “Hello World” of sorts.

After following every direction outlined in the documentation PAC Control User’s Guide and PAC Control Command Reference I am still getting the error -39 for the Receiver Module. Here is a quick outline of the steps in my strategy:

  1. Set the 2 GRV-CSERI-4 modules in slots 0 and 1.
  2. Configure the two I/O modules in groov Manage to RS-485, 2 wire, no termination, no bias.
    image
  3. Initialized the communication handles to the following
    image
  4. Opened outgoing communication with a downtimer to allow completion of operation of instruction after instruction is called.
  5. Set the EOM for both Transmit String and Receive String.
  6. Transmit
  7. Receive

I have tried the following:

  1. Using the recommendation as seen per the documentation such as Get Number of Characters Waiting

  2. Ensuring I wired the modules correctly, see the pin map below
    image

  3. Ensuring that jumper wires from GRV-CSERI-4 Module 1 and GRV-CSERI-4 Module 2 are making electrical connection (using continuity test on multi-meter).

See below for my Strategy block diagram and .zip file

RS485_Basic_Config.R10.5c.Pro.Download.D06102024.T140433.zip (7.1 KB)

It kind of sounds like you want to transmit from one module to the other as a test?

If that is the case - setup your sending in one chart and your receiving in a second chart and make sure you run the receiving chart first - it needs to be listening before you start transmitting.

I didn’t look at your strategy, so I may have misunderstood what you are trying to do.

Yes,

That is correct. Just a simple module-to-module test.

I will give that a go.

I still was not able to get it to transmit anything.

CHAR_COUNT stays at 0 even when Communication handles remains open the entire time.

You mentioned two wire configuration, but your wiring diagram is for 4 wire. Are you sure you have the wiring correct?

Regardless of wiring, etc, you should see the Tx LED flash when you send your hello world string.
Start there. Set it to send that string once a second and see the Tx LED flash that often.

Yes, I did that to confirm that Tx is working.

Does the Rx flash on the other module?

Hi Philip,

No, its not flashing. The Receive has been timing out since the beginning.

The RX LED is tied to the hardware (I am pretty sure from my testing in my workshop), so it should flash if the wiring is right.
Then, once both Tx on Ch1 and Rx on Ch2 are flashing in time, you can turn to the software aspect.

1 Like

I’m just double-checking some of the screenshots in the first post…
If you have one module as a 2-wire and the other as a 4-wire, that won’t work. They both need to be either full duplex or half duplex.

If both are two-wire, then you only need one wire between the two channels from Tx to Rx (the ground is internal).

On 2-wire rs485, the terminals are Tx and Rx both (transceivers). If using channel 0 on both CSERI modules you would wire terminal 1 to terminal 1 and terminal 2 to terminal 2.

1 Like

Yup, @philip once again is spot on. I was thinking of starting simple with RS-232… .doh… Sorry about that @mjacome

2 Likes

Thanks @philip and @Beno!

This solved the problem and now I am seeing the RX Led turn on.

I did not realize that the wiring schemes were different for RS-232 and RS-485.

Really appreciate the help!
-Marco

2 Likes