Hey guys,
I hope you can help me.
Not sure if I am totally missing something here but is there an easy way to convert an integer into ASCII in step 7 without returning the string version of it? I only say this as I have found FC5 in the IEC standard functions which allows you to convert DINT into ASCII, but outputs a string which I then cannot view.
What I need to do is convert integers into ASCII but still view the individual bytes. For example, 255 is 0xFF and each F is represented by 46 in ASCII so 255 becomes 4646. I then want to extract each ascii byte (46 in this case) so i can place it in a byte array and send over TCP/IP using the TSEND function.
Would it be best to do this using number extraction and maths for the conversion or by changing my byte array into a string array and then attempting to use the IEC converting block to produce a string of ascii characters?
Many thanks.
I hope you can help me.
Not sure if I am totally missing something here but is there an easy way to convert an integer into ASCII in step 7 without returning the string version of it? I only say this as I have found FC5 in the IEC standard functions which allows you to convert DINT into ASCII, but outputs a string which I then cannot view.
What I need to do is convert integers into ASCII but still view the individual bytes. For example, 255 is 0xFF and each F is represented by 46 in ASCII so 255 becomes 4646. I then want to extract each ascii byte (46 in this case) so i can place it in a byte array and send over TCP/IP using the TSEND function.
Would it be best to do this using number extraction and maths for the conversion or by changing my byte array into a string array and then attempting to use the IEC converting block to produce a string of ascii characters?
Many thanks.