Host Engineering Forum

General Category => Do-more CPUs and Do-more Designer Software => Topic started by: KennedyJon on July 31, 2024, 11:25:36 AM

Title: StreamIn Read out not converting to real
Post by: KennedyJon 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.
Title: Re: StreamIn Read out not converting to real
Post by: BobO 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.
Title: Re: StreamIn Read out not converting to real
Post by: KennedyJon on July 31, 2024, 12:52:45 PM
Here is a ScreenShot
Title: Re: StreamIn Read out not converting to real
Post by: BobO on July 31, 2024, 12:57:16 PM
Your string doesn't appear to contain a real value, i.e. something like "1.2345".
Title: Re: StreamIn Read out not converting to real
Post by: KennedyJon 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.
Title: Re: StreamIn Read out not converting to real
Post by: BobO 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.
Title: Re: StreamIn Read out not converting to real
Post by: KennedyJon on July 31, 2024, 04:08:05 PM
Thanks anyway!
Title: Re: StreamIn Read out not converting to real
Post by: BobO 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.  ;)