10-20-2013 09:17 AM - edited 10-20-2013 09:23 AM
Dear all,
Please let me to explain you the problem I'm dealing with. I'm trying to get some data from sensor and store them into a .txt file via serial RS485 communication. Communication itself is not a problem - I have a VI for reading holding registers of a sensor, but processing of this raw data is where I have stuck.
Here is an example of what I have to do:
What do I have:
0000 0199 0001 00EC ... (string displayed in HEX format)
What do I want:
[409, 65772, ...] (converted string into integer/decimal format, data type: array of integers/decimals)
00000199 -> 409
000100EC -> 65772
Best regards,
Marko
Edit: As it usually is, after posting this found an answer: http://forums.ni.com/t5/LabVIEW/Convert-string-to-integer-array/td-p/986540
10-20-2013 10:27 AM
Use type cast function.
10-20-2013 11:16 AM
Can this Type cast function be defined with different input types?
Example of array structure:
1-10 unsigned long
11-15 signed long
16-30 unsigned long
I know that I can split this array in 3 arrays, and then cast each of these arrays independently. But can this be done with a single type cast function?
10-20-2013 02:25 PM
No. An array can only consist of one type of data.
Also, a typecast function can only cast a number to a single type.