Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

whats is the encoding technique used on .nitrace file format?

Solved!
Go to solution

I am working on a data acquisition project where i need to read the .nitrace file created by NI I/O trace directly(not the exported  .txt file format ) using matlab. when i open the .nitrace file with matlab, I find some  encoded language (attached with the picture) which is not very useful without knowing the encryption technique used in .nitrace file format.

Any leads on this topic is appreciated.

 

Thanks,

Ranjith veeran

0 Kudos
Message 1 of 9
(2,619 Views)

Hi ranjith.muthuveeran,

 

I highly doubt about decoding .nitrace file format. Why not rather save NI I/O trace file into .txt? You even can do it from LabVIEW with NI I/O trace API: 

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P9MWSA0&l

 

Hope this helps!

Regards

 

Patrik
CTA, CLA
Helping (sharing) is caring!

If the post was helpful - Kudo it.
If the post answered your question - Mark it as Solution.
0 Kudos
Message 2 of 9
(2,572 Views)

As specified,  the tool I am working with is completely developed in  MATLAB platform. Is there any NI trace api available to perform the similar things in matlab ?

0 Kudos
Message 3 of 9
(2,565 Views)

Hi ranjith.muthuveeran,

 

there is no MATLAB API, or any text-language API publicly available for NI I/O trace. The only one you can freely use is the one in LabVIEW.

 

If the file is already outputted in .nitrace format from other LabVIEW application, you should ask the developer of that app to change it for text file format. Otherwise you can then export the .nitrace file manually in NI I/O trace which I believe, is not convenient 

 

Regards,

Patrik
CTA, CLA
Helping (sharing) is caring!

If the post was helpful - Kudo it.
If the post answered your question - Mark it as Solution.
0 Kudos
Message 4 of 9
(2,559 Views)

Thanks for the response. I am trying to resolve the problem by calling IO trace application from matlab and use 'java robot' in matlab to create the .txt file from IO trace.

0 Kudos
Message 5 of 9
(2,555 Views)

Sounds like an idea! 

 

Good luck, let us know, whether it did work out for you.

 

Regards,

Patrik
CTA, CLA
Helping (sharing) is caring!

If the post was helpful - Kudo it.
If the post answered your question - Mark it as Solution.
0 Kudos
Message 6 of 9
(2,552 Views)

Hello patrick,

is there any shortcut key available for exporting text file from IO trace ? 

thanks,

ranjith

0 Kudos
Message 7 of 9
(2,545 Views)

Hi Ranjith,

 

no direct constant.

However you can in Tools->Options->Logging set logging directly into the file (even .txt) after you captured desired API calls.

 

When you have NI I/O Trace window active, you can go with help of a Windows environment for a shortcut, therefore:

Alt+RightEnter+E

or

Alt+ArrowDown/ArrowUp+E

It's too simple, but it might work.

 

Regards,

Patrik
CTA, CLA
Helping (sharing) is caring!

If the post was helpful - Kudo it.
If the post answered your question - Mark it as Solution.
0 Kudos
Message 8 of 9
(2,540 Views)
Solution
Accepted by topic author ranjith.muthuveeran

Hello patrick,

Thank you for the response. i can successfully export the .txt file

the following is a simple matlab function which can export .txt file invoking io trace.exe:

 

function o = nitrace2txt(input_nitrace_file)
h = actxserver('WScript.Shell');
winopen(input_nitrace_file) % opens the .nitrace file using io trace
h.SendKeys('%'); %invokes attention to io trace
pause(1); %wait
h.SendKeys('%'); %points file menu
pause(1); %wait
h.SendKeys('{DOWN}'); %opens file menu
pause(1); %wait
h.SendKeys('E'); %points export
pause(1); %wait
h.SendKeys('~'); %perform exporting
pause(1); %wait
h.SendKeys('~'); %save txt file in the same folder
pause(1); %wait
h.SendKeys('%{F4}'); %closes ni io trace
end

Message 9 of 9
(2,536 Views)