VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass data between different custom devices?

I developed two different asynchronous custom devices. You can assume that one is the producer (of data) and the other is the consumer.

 

Can you suggest me one or more methods to pass data between the custom devices?

 

Thanks in advance!

0 Kudos
Message 1 of 13
(7,265 Views)

Something as simple as a named Queue or FIFO would work fine.

Jarrod S.
National Instruments
0 Kudos
Message 2 of 13
(7,257 Views)

Additionally, if applicable, you could map the output channels of the producer to the input channels of the consumer in System Explorer.

Jarrod S.
National Instruments
Message 3 of 13
(7,256 Views)

When you say FIFO, you don't mean the same FIFOs in the template created by the "Custon device template tool" VI... Isn't it so?

 

I don't understand how i can create a FIFO (or a queue) which can be pointed by two different custom devices, considering that the custom devices themselves consist in different projects.

 

Is there a way to pass a reference of a FIFO (or a queue) between two different projects?

 

In practice: can you show me the best (and more efficient - i need to pass lot of data..) way to realize this?

 

Smiley Tongue

0 Kudos
Message 4 of 13
(7,233 Views)

Any clues about?

0 Kudos
Message 5 of 13
(7,207 Views)

Named FIFOs successfully do the job (in my case, there were a lack of knowledge about them).

 

Jarrod, you say: "Additionally, if applicable, you could map the output channels of the producer to the input channels of the consumer in System Explorer".

 

This makes me think that there can be the possibility to avoid the use of FIFOs, taking advantage of the fact that there are other kind of FIFOs which are the channels themselves!

 

We can suppose that the producer custom device creates, when added to the System Explorer, a certain number of input and output channels. On the contrary, the consumer custom device doesn't have no channels, making impossible to map the channels in System Explorer.

 

What i want is that, when the execution starts, the consumer programmatically connects to few input and output channels (the ones created by the producer custom device), retrieving their values.

 

Do you think this is possible to realize? How? Thanks! Smiley Wink

0 Kudos
Message 6 of 13
(7,137 Views)

I tried two different methods (see image) without success. Clues o tips?

0 Kudos
Message 7 of 13
(7,111 Views)

Normally it should work...

 

Take a look at this post:

http://forums.ni.com/t5/NI-VeriStand/Error-while-using-execution-api/td-p/2121062

0 Kudos
Message 8 of 13
(7,103 Views)

.NET Execution API works only on the host side, so it will not work inside custom device.

 

Jiri

CLA, CTA

0 Kudos
Message 9 of 13
(7,097 Views)

Hi Jiri

 

Yep you're right, the first method he used works only on the host, but the second one should works no ?

If he "Get the channel reference", navigate through the reference to have a get the channel and then get the value of the channel using "get channel value"... I didn't try but i think it should work

0 Kudos
Message 10 of 13
(7,094 Views)