VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Device FIFO with multiple input/output

Solved!
Go to solution

Suppose I have input 1 and input 2 initialized as two channels. How would I be able to distinguish between the two when reading from the RT FIFO (asynchronous device if that matters)? And like wise, what about for output?

0 Kudos
Message 1 of 6
(2,695 Views)
Solution
Accepted by topic author James9

You should be reading/writing an array of doubles from the RT FIFO, with the order of the doubles in the array matching the order in which they were created in your initialization VI. 

 

Are you using the inline async custom device template?

Message 2 of 6
(2,668 Views)

@PlatypusRex wrote:

You should be reading/writing an array of doubles from the RT FIFO, with the order of the doubles in the array matching the order in which they were created in your initialization VI. 

 

Are you using the inline async custom device template?


It didn't cross my mind that it took in arrays (I assumed it just took one value at a time). By order in initialization, you mean the device reference/subsection linking order, right?

 

 I'm using just the regular Custom Device Template Tool set to Asynchronous.

0 Kudos
Message 3 of 6
(2,662 Views)
Solution
Accepted by topic author James9

 

As 1st step, define those channels in Initialize.vi.Initialize.PNG

 

You can retrieve those from RT FIFO array in RT driver. In this case,

index0 = 1st channel

index1 = 2nd channel

bd.PNG

 

Certified LabVIEW Developer
There are only two ways to tell somebody thanks: Kudos and Marked Solutions

GCentral
Message 4 of 6
(2,647 Views)

Suppose I had a loop enclose around the input section to make input a & input b. Would the order, I presume, be 1st channel a, 2nd channel a, 1st channel b, and 2nd channel b?

0 Kudos
Message 5 of 6
(2,637 Views)

For loop would be executed two times.

1st is a, and 2nd is b.

Certified LabVIEW Developer
There are only two ways to tell somebody thanks: Kudos and Marked Solutions

GCentral
Message 6 of 6
(2,616 Views)