I have a remote controlled relay that takes commands via a serial port. It takes commands in ASCII character codes, 1 meaning turn on relay for instance. My problem is that when you send a 1 to the serial port, it gets interpreted as the ascii character 1, ans sends the code for 1 instead (49).
Hi Mathias, right click on the string constant you are sending to the serial port, check "Hex display", then input any numerical value you want (in hex form, of course)
Paolo ------------------- LV 7.1, 2011, 2017, 2019, 2021
I'm not sure if this will solve your problem but you could try to use the Byte Array To String and the String to Byte Array functions. In LV8.2.1, there are located in the String >> String/Array/Path Conversion group of the functions palette.
I looked at the 'byte to string' earlier but did not quite understand how it worked. Is it so that the string then will contain the ascii characters that in the end will be transformed to the correct ascii character code?