News:

  • August 02, 2026, 06:50:11 PM

Login with username, password and session length

Author Topic: BRX PLC to Agilent Twistorr 84 Serial Communication? Help, please!  (Read 19067 times)

3DWompus

  • Newbie
  • *
  • Posts: 4
Hi,

I am currently working on trying to get a BRX-DM1-18AR PLC to communicate with a TwisTorr 84 FS (Agilent Technologies) vacuum pump through RS-232 serial protocol. I have been having a great deal of trouble with this, and help would be greatly appreciated.

I am programming the PLC in Do-More Designer. I have double, triple, and quadruple checked the BAUD (9600), Bit Structure (8n1), etc. are matched between both the program configuration and the pump configuration. So, I am fairly confident it is not a config error. Additionally, I have tested the pump with the A+ driver software (provided by Agilent) to test the hardware. The pump is capable of serial communication (tested through the A+ software) and the PLC is capable of serial communication (tested with other devices). So, I know it is not a hardware issue either.

I am currently using the STREAMOUT /STREAMIN functions to transmit strings of hex code through the FmtInt function. I have previously tried using string literals, which did not work either.

The manual (attachment showing code format and link to manual at bottom of the post) shows that the code is some format of hex. However, when i format this code into Do-More Designer, and STREAMOUT to the pump controller, I receive no response. I have the STREAMIN function set up to read the delimiter "0x03", which is specified as the ETX in the manual. Additionally, the RX on the PLC do not light up, indicating that the pump had not received communication it recognized.

I have tried:
-hex w/ prefix and space. I.e., "0x02 0x80 ... "
-hex w/ prefix, w/out space. I.e., "0x020x80 ..."
-string literal w/ spaces. I.e., "02 80 30..."
-string literal w/out spaces. I.e., "028030 ..."

Additionally, I had briefly tried MODBUS protocol instead of ASCII/Custom protocol. I was unable to get anywhere with that either.

If anyone knows how to solve this problem and could walk me through it, I would greatly appreciate it.

Link to pump manual. Serial Communication section (in English) starts on page 172 https://www.agilent.com/cs/library/usermanuals/public/TwisTorr%2084%20FS%20AG%20Navigator%20Controller.pdf
« Last Edit: March 15, 2023, 03:04:16 PM by 3DWompus »

Greg

  • HostTech
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 702
  • Hmmm...
    • Host Engineering, Inc.
Re: BRX PLC to Agilent Twistorr 84 Serial Communication? Help, please!
« Reply #1 on: March 15, 2023, 03:29:08 PM »
There are a few ways to do this. One way is to use a STRPRINT instruction, putting the result in a string of your choice (e.g. SS1). In the Print Script box you could put:

"$02$80$30$30$30$31$31$03$42$33"

The "$" is a special format for literal strings. It means the next two characters are hex values (e.g. $hh). When you have executed this you'll get SS1 with the 10 bytes you desire. Then STREAMOUT that string (e.g. SS1).

You could create a byte buffer (i.e. ByteBuff0-255) in the Memory Config. Then use the INIT instruction and put in the following data:

Start / End / Value
ByteBuff0 / / 0x2
ByteBuff1 / / 0x80
ByteBuff2 / ByteBuff4 / 0x30
ByteBuff5 / ByteBuff6 / 0x31
ByteBuff7 / / 0x3
ByteBuff8 / / 0x42
ByteBuff9 / / 0x33

Then use a STRPUTB that puts these 10 bytes into a string (e.g. SS0), Start at Index = 0, Length in Bytes = 10, From Starting Element = ByteBuff0. Then use the STREAMOUT to send out SS0.

These are just oversimplified ways to do this.
There are two types of people in the world; those that can extrapolate from incomplete data sets.

3DWompus

  • Newbie
  • *
  • Posts: 4
Re: BRX PLC to Agilent Twistorr 84 Serial Communication? Help, please!
« Reply #2 on: March 15, 2023, 04:38:38 PM »
What would the non-oversimplified solutions look like?

Greg

  • HostTech
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 702
  • Hmmm...
    • Host Engineering, Inc.
Re: BRX PLC to Agilent Twistorr 84 Serial Communication? Help, please!
« Reply #3 on: March 15, 2023, 04:53:27 PM »
What would the non-oversimplified solutions look like?
I just meant that I don't know your app, therefore I don't know if the STREAMOUT string is going to be static, or if it changes all the time. In which case you might make those bytes dynamic instead of static like I have shown them. Plus, I don't know if you are going to parse the answer your receive in your STREAMIN, or if that will also be a static stream of bytes. I did not study your manual you posted.

But what I have shown you should get you started with something that works.
There are two types of people in the world; those that can extrapolate from incomplete data sets.

3DWompus

  • Newbie
  • *
  • Posts: 4
Re: BRX PLC to Agilent Twistorr 84 Serial Communication? Help, please!
« Reply #4 on: March 15, 2023, 10:56:48 PM »
I was able to get it started with what you provided me. Thank you. I was apparently just overthinking the data structures and forgot that Do-More is kind of weird about the "$" formatting.

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3838
    • Host Engineering
Re: BRX PLC to Agilent Twistorr 84 Serial Communication? Help, please!
« Reply #5 on: March 15, 2023, 11:06:55 PM »
I was able to get it started with what you provided me. Thank you. I was apparently just overthinking the data structures and forgot that Do-More is kind of weird about the "$" formatting.

Actually, that is standard for text escape sequences in IEC-61131 for PLC programming languages.

Check out the String Escape Sequence table here:
https://en.wikipedia.org/wiki/IEC_61131-3#Data_types

3DWompus

  • Newbie
  • *
  • Posts: 4
Re: BRX PLC to Agilent Twistorr 84 Serial Communication? Help, please!
« Reply #6 on: March 16, 2023, 10:25:55 AM »
Really? I did not know that. I recently started PLC programming as part of my Lab work at school. I've just been stumbling around in the dark for the past 2 months trying to figure out how everything works. I will be checking that out, thank you