Tarasik (Customer) asked a question.

BRX Serial Setting

I'm trying to figure out how to work with the serial port. So far, without success. I ask for help.

I created the simplest program for communication between the PLC and the terminal utility Hercules. The ports settings are the same. Setting_Serial_Port I am sending the string "Hi From BRX"

In hex: 48 65 6C 6C 6F 20 46 72 6F 6D 20 42 52 58

 

But in the terminal utility I get

Serial Communication What am I doing wrong?

Thank you


  • Tarasik (Customer)

    The problem is found. The levels are incompatible, and the signal is inverted. When I connected the oscilloscope, everything became clear. I was stupid :) trying to make friends RS232(+/-5V) and UART(0 - 5V)

    Now I need to find the right adapter, because the device I'm trying to communicate has a built-in 0 - 5V UART on board

    See the pictures below

    In both cases I send 0000 1000

    UART

    UARTBRX RS232

    BRX RS232

     

     

    Expand Post
    Selected as Best
  • HOST_franji1 (HOST Engineering)

    As you toggle X3 OFF then ON multiple times, does the data received change every time, or is it always that strange pattern, or sometimes the same, sometimes not (i.e. is there any consistency/pattern to the received data?)

    • Tarasik (Customer)

      Every time X3 goes from low to high, data is sent.

      Serial2

  • HOST_BobO (AutomationDirect)

    Are both sides RS232 or RS485?

     

    If RS232, wiring should be RX to TX and TX to RX. If RS485, should be D+ to D+ and D- to D-.

     

    If RS232, grounding between the PLC and the PC can cause problems. Make sure the chassis grounds are connected. This is more commonly a problem with DC powered PLCs, not sure why.

     

    Beyond that, not sure. It generally just works.

    Expand Post
  • Tarasik (Customer)

    Both are RS232. I use FTDI USB to RS232 (5V) adapters quite often for communication between PC and ARM controllers. Now I decided to try PLC BRX...

    Unfortunately, grounding didn't help. The problem is somewhere else

  • ADC_PLC_ENG (AutomationDirect)

    I tested with Realterm and Hercules. See results below. I am not sure how to get the Hercules to display in HEX. First time I have ever used it. Real Term set to display as HEX shows correct data.

     

    HerculesRealTerm

    Expand Post
    • Tarasik (Customer)

      Thank you! Your answer gives me hope. Please explain how you configured the port in the BRX.

      Before I thought that the FTDI adapter was faulty, bought another one, the result is the same.

      Hercules - Right-click on the data window - set check mark HEX. the next message will be displayed as hex.​

  • ADC_PLC_ENG (AutomationDirect)

    See screen shots below of results from internal port in HEX . I also tested with a RS232 POM module the BRX and both work as expected. I am running the latest Do More SW and fw 2.9.4. Also I am using the EA-MG-PGM-CBL usb to serial adapter on a windows 10 PC. I have a rj12 cable with bare leads to wire to the connector on teh internal port.

     

    https://www.automationdirect.com/adc/shopping/catalog/cables/operator_interface/c-more_touch_panel_-a-_micro-graphic_panel_cables/ea-mg-pgm-cbl

     

     

    Hercules_2Int_portInt_Protocol

    Expand Post
  • Garry (Customer)

    Hi @Tarasik (Customer)​ 

    As a reference here is a post that will show communications to a Solo Temperature controller using serial RS485. The protocol is Modbus ASCII which is not available on the BRX, so ASCII is being sent and received.

    This demonstrates all of the items needed to send and receive using the serial port.

    https://accautomation.ca/brx-do-more-plc-modbus-ascii-protocol/

    https://youtu.be/X_lzKSIwzrk

    This may help you out.

    Regards,

    Garry

    ACC Automation

     

    Expand Post
  • Tarasik (Customer)

    Thanks to everyone who is trying to help. I continue to struggle with this problem to no avail so far. There is some kind of logic, but it is very strange. And also, I send one byte, but for some reason I get two at the other end.

     

    RS232_1RS232_2RS232_64RS232_15

    Expand Post
10 of 12