05-14-2008 01:39 AM
Dear all,
Let's confine to another query regarding indicators and write to text file.
I have 4 indicators (2 arrays and 2 integers) and i need to write these values to a text file till the program stops. I used "build array" to convert all these 4 values to a 1D array and gave as input to the writetospreadsheetfile.vi
But the output in the file was in decimal values and actually my indicators will show hexadecimal values.
How to achieve hexadecimal values to be written in the text file as such the indicator is displaying?
Thanks,
Mathan
05-14-2008 01:54 AM
Hi mathan,
try this.
Hope it helps.
Mike
05-14-2008 02:03 AM
@sth wrote:
[...]
But like any powerful tool, it can be misused. [...]
05-14-2008 03:49 AM
Dear mike,
I studied the use of arraytospreadsheetstring function from your example.
I need the output in the text file like this format. How it was possible?
Date,Time name1(constant) indicator value1 (in hex)
Date,Time name2(Constant) indicator value2 (in hex)
Example:
- Doctor 3B,6D,14,23.....(Like this) some 17 values
- Patient 12,43,ac,f7.....(Like this) some 17 values
- Doctor 3B,6D,14,23.....(Like this) some 17 values
- Patient 12,43,ac,f7.....(Like this) some 17 values
- Doctor 3B,6D,14,23.....(Like this) some 17 values
- Patient 12,43,ac,f7.....(Like this) some 17 values
Thanks,
Mathan
05-14-2008 04:08 AM
Hi mathan,
here is another example for you.
Hope it helps.
Mike
05-14-2008 06:09 AM
Dear mike,
That quick example shows ur in depth knowledge. Thanks.
But still i had two problems.
1) I need to insert the current system date and time in the first column of each line as i mentioned in my previous post.
Date,Time Doctor(constant) indicator value1 (in hex)
Date,Time Patient(Constant) indicator value2 (in hex)
2) Everytime the values are getting overwritten in the text file rather than get appending. (Am using a while loop outside and i stops the vi after some particular iterations).
Please update me asap. Look at my attachment.
Thanks,
Mathan
05-14-2008 06:17 AM
Hi mathan,
try this. ![]()
Mike
05-14-2008 06:46 AM
Norbert B wrote:
I concur that variables are indeed a powerfull tool. But since LabVIEW variables behave different from variables known through textual ADEs, they are the most misused tool ever in LV i asume....
And that is, why they are evil......
05-14-2008 07:12 AM - edited 05-14-2008 07:12 AM
Dear mike,
I worked it out fine. So much thanks and stars for you.
P.S. I used this for date/time

Thanks,
Mathan
05-14-2008 10:15 PM
Mike,
You can directly wire the HEX array to the Number to Hexadecimal String converter, no need for FOR loop. ![]()