Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » 4DIAC - Framework for Distributed Industrial Automation and Control » Float to text conversion(Not converting float to text)
Float to text conversion [message #1862657] Tue, 19 December 2023 12:45 Go to next message
André Soçva is currently offline André SoçvaFriend
Messages: 83
Registered: November 2023
Member
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 Go to previous messageGo to next message
Martin Melik Merkumians is currently offline Martin Melik MerkumiansFriend
Messages: 117
Registered: March 2016
Senior Member
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 Go to previous messageGo to next message
André Soçva is currently offline André SoçvaFriend
Messages: 83
Registered: November 2023
Member
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]

Report message to a moderator

Re: Float to text conversion [message #1862664 is a reply to message #1862659] Tue, 19 December 2023 18:46 Go to previous messageGo to next message
André Soçva is currently offline André SoçvaFriend
Messages: 83
Registered: November 2023
Member
Someone can help me to read REAL values in 4DIAC? I'm usign a RT1060 of NXP. The logic works, when i add two values. But i cant see the values.
Re: Float to text conversion [message #1862696 is a reply to message #1862664] Thu, 21 December 2023 12:52 Go to previous messageGo to next message
Martin Melik Merkumians is currently offline Martin Melik MerkumiansFriend
Messages: 117
Registered: March 2016
Senior Member
"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 #1862697 is a reply to message #1862664] Thu, 21 December 2023 12:52 Go to previous messageGo to next message
André Soçva is currently offline André SoçvaFriend
Messages: 83
Registered: November 2023
Member
Hi, i need help.
Re: Float to text conversion [message #1862706 is a reply to message #1862697] Thu, 21 December 2023 16:56 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

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,.
Re: Float to text conversion [message #1862708 is a reply to message #1862706] Thu, 21 December 2023 20:04 Go to previous messageGo to next message
André Soçva is currently offline André SoçvaFriend
Messages: 83
Registered: November 2023
Member
Thanks for the help Alois. In the case, when i change the lib in my project, i dont turn on the print float in my properties. Now its working.
Re: Float to text conversion [message #1862717 is a reply to message #1862708] Fri, 22 December 2023 07:57 Go to previous message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

Great to hear that it is now working for you.
Previous Topic:Build NXP Gpios
Next Topic:4DIAC IDE
Goto Forum:
  


Current Time: Sat Apr 27 15:09:43 GMT 2024

Powered by FUDForum. Page generated in 0.04482 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top