11-27-2012 08:01 AM
Firstly, I wanted to thank you for your time and for showing some interested in helping me out.
Now, you're right, it should be 10, I was possibly testing something when I took the snapshot
I have found a way of seperating the strings using the split string function. It works fine as I have a total of 10 bytes, 5 for temp, 5 for pres.
The problem starts when converting the string into an array.
e.g Temp of 247 and Pres of 26987 will result in 12850. In this VI I have two seperate strings, two u8 conversions and one index array, gives out one joint element.
Regarding the latest VI I've posted, trying to read 10 bytes from the port gives a Temp of 12320 and Pres of 12856
When highlightin the process I can see the numbers changing in the conversion bit(sounds logical) but also the arrangement of the numbers in the string.
e.g 251 28309 becomes 1 28309 *
I am a bit stuck....really
Would a header help e.g AA and have 12 bytes?
Thank you
Stav
11-27-2012 08:22 AM
Now it seems to output the numbers in the right order but still something not right
Here's what happening while itterations occur
11-27-2012 08:26 AM
First and second itterations give out these two results, the rest up to ten give ##
Numbers are possibly displayed right in the string now as I have added a 1 second delay
Any thoughs would be greatly appreciated
Thank You
11-27-2012 08:31 AM
I don't understand your logic with the FOR loop. I thought you were putting out ASCII characters.
The coerce to a U16 is not needed. The output of the Join Numbers is a U16.
You only have 2 numbers. So your FOR loop should only iterate twice.
I don't think you want to just keep adding to your string. Just grab one message and process it.
Instead of the Type Cast, you really want the Array to Cluster. Be sure to change the cluster size to 2.
11-27-2012 08:44 AM
Thank you for the reply
I have changed everything but nothing changes
I wanted to output the temp and pres values into virtual meters, such as thermometer, thus the conversion and the for loop
That is the only thing troubling me now, how to convert the string so I display these values in a meter
Stav