HVAC and Pumping Forum
Support Forum for HVAC and pumping machines, Modicon M17x and EcoStruxure Machine Expert HVAC software for chillers, AHU, CRAC units for datacenters or process chillers applications - from design, implementation to troubleshooting and more, by Schneider Electric.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-02-11 06:24 PM
Hello guys, so I'm working on a project at my company where I was asked to make sensor readings printable with a serial printer. Here I am a little confused with the floating point data type if I change it to ASCII the value becomes random. Is there a solution to this problem? I thank you in advance. (sorry for my bad English)
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-02-14 01:36 PM
If your float value is -0.01 and you convert this to ASCII then I would expect it to result in the following byte/character array values:
0x2D, 0x30, 0x2E, 0x30, 0x31
Depending on how the ASCII is stored, there may be a prepended length (0x05), maybe even 0x00,0x05 or 0x00,0x00,0x00,0x05 depending on the size of the length field (8bit, 16bit, 32bit).
It may also be terminated with a null character 0x00
I'm not familiar with the FLOAT_TO_ASCII function however, so you should refer to the manual for this function to determine in what format it will produce its output.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-02-17 02:35 AM
Hello @beryllarachman00
This forum is for EcoStruxure Automation Expert and IEC61149 related topics, so unfortunately your question is in the wrong place!
I will move your post to a more appropriate forum...
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.
With achievable small steps, users progress and continually feel satisfaction in task accomplishment.
Usetiful Onboarding Checklist remembers the progress of every user, allowing them to take bite-sized journeys and continue where they left.
of