Float to text conversion [message #1862657] |
Tue, 19 December 2023 12:45  |
Eclipse User |
|
|
|
Hello, I'm having problems reading REAL values by the RT1060 microprocessor. I managed to debug and found the values calculated correctly by the block I used, which was a sine block. You can see the correct input and output data in the image. I defined the value 1.57 at the input and the result of the sine of this value is 1. My question is where the conversion of this value to text occurs and how it is sent via TCP/IP communication. Can you tell me where this conversion takes place? Thanks.
|
|
|
Re: Float to text conversion [message #1862658 is a reply to message #1862657] |
Tue, 19 December 2023 12:57   |
Eclipse User |
|
|
|
Hi,
several questions:
What versions of 4diac-IDE and FORTE are you using?
what do you mean with "conversion of this value to text occurs" ? Where are you checking a textual representation of the value? Or to phrase it differently, what is connected to your TCP/IP connection?
|
|
|
Re: Float to text conversion [message #1862659 is a reply to message #1862658] |
Tue, 19 December 2023 13:06   |
Eclipse User |
|
|
|
Hello Martin, i'm using 4diac 2.0 and the forte 2.0.
The second question: is in the code, where the values are read and convert to string to send in the TCP.
The third question: when i put the watch in 4diac, the value of the F_SIN is empty. He dont send the value to 4diac.
[Updated on: Tue, 19 December 2023 13:11] by Moderator Report message to a moderator
|
|
|
|
Re: Float to text conversion [message #1862696 is a reply to message #1862664] |
Thu, 21 December 2023 12:52   |
Eclipse User |
|
|
|
"is in the code, where the values are read and convert to string to send in the TCP." that does not really answer my question, as you can send the data via TCP e.g via Client/Server blocks, but also monitoring is using TCP
Based on your third answer I assume you are using monitoring to watch the values in the IDE. If that is what you are looking for, then the toString in CIEC_REAL method is what you are looking for.
However, the versions you use are rather old and outdated (I know its the official current release), in the newer versions, toString has been modified and is known to work and has been patched for several reasons.
Perhaps you give the new versions a try first
|
|
|
|
Re: Float to text conversion [message #1862706 is a reply to message #1862697] |
Thu, 21 December 2023 16:56   |
Eclipse User |
|
|
|
looking at your screenshots I assume that you are talking about the tcp communication used for Montioring. The strings to be sent here are converted in the to string method of the respective data types. so in your case you need to look into the toSTring method of CIEC_REAL,.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04721 seconds