From 11:00 PM CDT Friday, May 10 – 02:30 PM CDT Saturday, May 11 (04:00 AM UTC – 07:30 PM UTC), ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

SequenceFileTranslator -> picking a specific one programatically

Solved!
Go to solution

Hi y'all,

 

I have stumbled over the Sequence File Translator API in TestStand. Though it is not doumented too much, I think I can get the stuff to work using the examples and template.

 

My use case at the moment is being able to mass-convert a massive amount of proprietary XML files into seq files. Before getting into the nitty-gritty details of the actual conversion, I want to make sure, the "infrastructure" structure works.


The idea is to prgramatically open all XML files one by one and using a custom SequenceTranslator DLL for conversion.

 

Using one of the examples that NI provides, I can open the according example file. 

 

What I haven't found out yet: how does the Engine determine, which translator to use? Does it try all registered translators until the first one returns CanTranslate = True?

 

 

 

 

 

 

0 Kudos
Message 1 of 5
(274 Views)
Solution
Accepted by topic author Oli_Wachno

Hi, 

 

Yes, that is correct. The engine will try all installed translators in NI and User directories until the first one returns CanTranslate = True. 

 

Regards, 

Anand Jain

NI

Message 2 of 5
(245 Views)

Thanks for your anser and sorry to ask related/ further questions:

 

1.) which is the sequence, the callbacks are used in by SeqEdit?

"Debuggin" using the LabVIEW Example and Dialog Boxes, I see that 

  • GetTranslatorCount
  • GetExtension
  • GetDescription

are called on starting SeqEdit.

 

Placing a dialog box in TranslateToSequence causes TS to hang when starting an actual conversion

Dialog Boxes in GetFileVersion and GetFileFormatVersions never appear

 

2.) [Personal lack of proficiency creating DLLs from LabVIEW]

 

Referring to the XML Sample Project from the TestStand example: there must be some kind of translation from XMLGetCalcCount.vi to the DLL Callback GetCalcCount

I suspected this to happen in the build spec, but couldn't find it.

 

 

0 Kudos
Message 3 of 5
(204 Views)

as for part two of my question:

 

typical case of wood and trees 

Oli_Wachno_0-1707748055611.png

 

0 Kudos
Message 4 of 5
(194 Views)

For future reference:

 

setting up LabVIEW to debug a SequenceFileTranslator, refer to 

 

https://lavag.org/topic/6964-debugging-a-compiled-labview-dll/

 

Though the post is ~16 years old, it this still works as described here 😀

 

 

0 Kudos
Message 5 of 5
(61 Views)