News:

  • February 11, 2025, 12:18:00 AM

Login with username, password and session length

Author Topic: StreamIn Read out not converting to real  (Read 634 times)

KennedyJon

  • Newbie
  • *
  • Posts: 4
StreamIn Read out not converting to real
« on: July 31, 2024, 11:25:36 AM »
I am having trouble getting a real number from the string to real option. I am using streamin to get data from a serial port and in putty the output is correct but when i connect in do more the readout is different and does not convert to real. Not sure what the next step is.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6068
  • Yes Pinky, Do-more will control the world!
Re: StreamIn Read out not converting to real
« Reply #1 on: July 31, 2024, 12:31:17 PM »
I am having trouble getting a real number from the string to real option. I am using streamin to get data from a serial port and in putty the output is correct but when i connect in do more the readout is different and does not convert to real. Not sure what the next step is.

Post a screen cap of your code.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

KennedyJon

  • Newbie
  • *
  • Posts: 4
Re: StreamIn Read out not converting to real
« Reply #2 on: July 31, 2024, 12:52:45 PM »
Here is a ScreenShot

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6068
  • Yes Pinky, Do-more will control the world!
Re: StreamIn Read out not converting to real
« Reply #3 on: July 31, 2024, 12:57:16 PM »
Your string doesn't appear to contain a real value, i.e. something like "1.2345".
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

KennedyJon

  • Newbie
  • *
  • Posts: 4
Re: StreamIn Read out not converting to real
« Reply #4 on: July 31, 2024, 04:00:36 PM »
Yes, that is sort of the issue. When i get a read out from the serial port to putty the values are real numbers, but for some reason when i plug that same serial cable into the SERIO port it receives random values. I think when the serial port communicates to the plc it is somehow getting messed up. The baud rate, parity , data bits, and stop bits have all been set to the correct values.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6068
  • Yes Pinky, Do-more will control the world!
Re: StreamIn Read out not converting to real
« Reply #5 on: July 31, 2024, 04:05:27 PM »
Yes, that is sort of the issue. When i get a read out from the serial port to putty the values are real numbers, but for some reason when i plug that same serial cable into the SERIO port it receives random values. I think when the serial port communicates to the plc it is somehow getting messed up. The baud rate, parity , data bits, and stop bits have all been set to the correct values.

Lot of possibilities there, but until you get clean data into the PLC nothing else is possible. Forum probably isn't the best medium to resolve that. ADC tech or support@hosteng.com should be able to help with that.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

KennedyJon

  • Newbie
  • *
  • Posts: 4
Re: StreamIn Read out not converting to real
« Reply #6 on: July 31, 2024, 04:08:05 PM »
Thanks anyway!

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6068
  • Yes Pinky, Do-more will control the world!
Re: StreamIn Read out not converting to real
« Reply #7 on: July 31, 2024, 04:14:27 PM »
Thanks anyway!

Not trying to run you off, just trying to get you better help than I can provide. I'm a software engineer...this is a hardware problem.  ;)
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO