From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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
(241 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
(212 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
(171 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
(161 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
(28 Views)