MrPLC Member
  • Content count

  • Joined

  • Last visited

Everything posted by Drewdin


    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. 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!
  3. ASCII Conversion

    Did you ever find a solution to this issue?

    I was trying to set the individual bit using a MOV, COP and a CPS, but every time I try to move a 16#24 into stringbyte[5]. When i look at the stringbyte[5] = #, stringbyte[6] = 2, stringbyte[7] = 4. Any suggestions? Thanks

    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