Drewdin

MrPLC Member
  • Content count

    5
  • Joined

  • Last visited

Posts posted by Drewdin


  1. Thanks for the reply, a co-worker helped me get it working. Since my data was in form:

    MassFlow.DATA[0] = $EF

    MassFlow.DATA[1] = $01

    MassFlow.DATA[2] = $D9

    etc...

    I ended up using a BTD command to distribute the bits from the MassFlow.DATA[0], etc... to a DINT and then back from a DINT to a string. It worked perfectly


  2. 22 hours ago, Ken Roach said:

    MicroLogix 1500 or CompactLogix controller ?

    The RSLogix 500 and Studio 5000 syntax for hex characters is a little different, I think.  RSLogix 500 liked to use old conventions for some control characters.

    In the Studio 5000 string browser, a dollar sign is done by doubling, i.e.   $$   means a single dollar sign character.

    If you're concatenating or creating strings right in the SINT[x] elements, just use 16#24 to designate ASCII character 24, the dollar sign.

    I'd first take a bit of a step back and be sure that the mass flow controller is really looking for hex characters, or if it is looking for ASCII representations of hex characters.

    As pure hex, $02$21$AD is three bytes.    But as an ASCII representation of hex characters, it's nine bytes.

    I am using a Compact Logix L33ER, I tried using the $$ approach but it didn't work, when concatenated it removes it completely. I tried accessing the output channel of the ascii card and putting in the 16#24 but it didn't go through. It might be something I am doing, ill keep looking into that.

    As for the complete hex string, I just gave a crappy example of what I needed, that is not my true packet being sent. What I have been dong is concatenating my string and then moving it to the ASCII cards output. The strings I have already have the $A9, etc... The problem is when I am calculating the HEX and then I need to move it into the string  with the dollar sign. The tricky part is that is is a Hex string, not hex. that's the curve-ball I cant hit. Thanks


  3. I am using a 1769-ASCII card to talk to a Mass Flow Controller, the problem is that I need to send it a string of HEX characters. Initially I was sending a sting of '0221AD' and I found that the device was not responding. Then i sent a string of '$02$21$AD' and I got the response i was looking for.

    There is one packet of data that i need to calculate so I cant manually add the dollar sign to the string, I have tried everything to add a concatenate $ to a string of AD to get $AD dynamically and I cant find anything that works. To get the hex, i am summing decimal values and them converting it to hex. The issue is that the $ is reserved char. Does anyone have any ideas or suggestions to get me over this hurdle?

    Thanks!