|
Post by Antoine on Jun 12, 2014 7:59:18 GMT
Hi,
How would you recommend to do to share data between different test, let's say we start from the "PTP Sequencer Test Execution Example", there's a step init hardware and a step close hardware, if I open a COM port session in the "open HW" how can I pass this ref to the other tests like "close HW"?
Cheers
|
|
|
Post by Thoric on Jun 12, 2014 8:42:39 GMT
The mechanism you choose to adopt for sharing data is entirely down to you, PTP Sequencer places no restrictions or limitations on whatever technique you prefer. Therefore, use a framework that you're most comfortable with for sharing data between VIs. PTP Sequencer is an engine for managing sequence definitions, and not a fully functional test executive that would more reasonably handle your data and generate reports. Adding those parts is down to you, and you can use the included example Test Executive framework as a starting point for this if you wish.
Some options, off the top of my head, are: 1. Global Variables. These present the simplest way to globally share data, but have pitfalls associated with improper use. You'll need to keep them 'alive' after the termination of each test VI. 2. Functional Global Variables. Can be a little more robust but essentially the same as a global. 3. Named Queues. Allow you to pass data between endpoints reasonably easily. 4. Use a temporary file as a buffer (data written from one VI is read into the next).
PTP Sequencer is a powerful engine which can be used as the foundations for creating your own testing software, but we recognise that some developers would like a more complete Test Executive framework. We may begin working on toolkits that provide some of these additional features, but it's very early days yet.
|
|
|
Post by Antoine on Jun 13, 2014 5:21:20 GMT
ok... I asked this because I've been nosing in the PTP Seq dependencies and saw a "PTPSeq_Link.lvclass" and a "PTPSeq_Link_Data.lvclass" and I thought it was an integrated mechanism for sharing data through a sequence.
|
|
|
Post by Thoric on Jun 13, 2014 9:41:23 GMT
Those are for messaging between the PS_Service (a background service that manages all instances of sequences in memory) and all registered handlers of those sequences (such as the Tree XControls). The link class shouldn't be used in your code anywhere, it's scope is restricted to the internal workings of the PTP Sequencer engine. Don't go rootling around too deeply in there, it's a bit of a minefield and you might get lost!
|
|
|
Post by Antoine on Jun 13, 2014 14:09:34 GMT
Don't go rootling around too deeply in there, it's a bit of a minefield and you might get lost! Oh well.. geeks will be geeks. Anyway thanks for explaining this I will stop poking around and focus more on how I could share data through a sequence.
|
|