01-24-2017 04:54 PM
Attached is the modified NI-XNET subVI - CAN Frame to Table. Transferring the hex data stream to a file (.txt, .xcl) causes the stream to convert to decimal. How can it be saved in its original hex format? That is the issue.
01-24-2017 04:56 PM - edited 01-24-2017 04:57 PM
Excel data sheet for the same program.
01-24-2017 05:05 PM - edited 01-24-2017 05:08 PM
I can't see how you are writing to your file but try the %x format so numbers are written as hex numbers instead of the default (floating point decimal %f).
Or posibly the %S so they are writtne as strings, then maybe Excel will not reformat them to decimal.
Also you can highlight the cells and use "format cells" in Excel to change the format to Hex
01-24-2017 06:00 PM
CAN Frame to Table VI reads the data through write delimited spreadsheet VI. Write spreadsheet string is one of the subVIs in delimited speadsheet. I tried changing the formats to %x and %s but it changing back to %d when it starts running. That could be the problem. Now; I think, the issue is how can the default value can be changed and set in the Write delimiyted spreadsheet VI program. You advise is greatly appreciated.
01-24-2017 06:13 PM
Where is the VI that calls the Write Delimited String? Does the CAN VI have a format input?
01-24-2017 06:30 PM
01-24-2017 07:03 PM
Since you are already using a modified version, just add a constant to the CAN VI to set the format. That format is then passed into the Write Delimited Text File.
01-25-2017 09:25 AM - edited 01-25-2017 09:28 AM
@mjafarin wrote:
CAN Frame to Table VI reads the data through write delimited spreadsheet VI. Write spreadsheet string is one of the subVIs in delimited speadsheet. I tried changing the formats to %x and %s but it changing back to %d when it starts running. That could be the problem. Now; I think, the issue is how can the default value can be changed and set in the Write delimiyted spreadsheet VI program. You advise is greatly appreciated.
Are saying this does not work?
Once you have it in Excel formatting the colums as text makes them lineup left justified.
01-25-2017 09:46 AM
What do you mean it is turning it back to %d?
If you change the constant to %x, it stays, and works. At least for me in LV 2015. If it isn't for you, that would be the sign of a major LabVIEW bug. Unless you are doing something different than what you are describing.
01-25-2017 12:35 PM
In fact this is exactly what is happening. Unless there are some hidden steps/configurations that I am not aware of.