LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA Array Broken Wire

I am trying to connect my array of com port locations into a Subvi but not sure why I keep getting this error. I am unfamiliar with the last line "type of the sink".

The_Gadel_0-1710778040849.png

 

This is my cluster of arrays, the Fluke gauges is the array I am trying to connect into the Subvi. 

The_Gadel_1-1710778107363.png

 

 

Thanks,

 

0 Kudos
Message 1 of 12
(359 Views)

Can you show what is your subvi expecting ? 

Make sure that the subvi input is the same type. 

0 Kudos
Message 2 of 12
(351 Views)

The_Gadel_0-1710778711286.png

It is expecting a resource name, which I assumed my array was an array of resource names. I want to be able to keep the resource names in the array so I dont have to edit the code too much. It does work if I take them out of the cluster though and connect them individually. 

0 Kudos
Message 3 of 12
(347 Views)

if your sub vi is expecting a resource name and you are wiring an array of resource names that's the issue. 

You need to specify with array element you want to pass on to the subvi. 

If you want to repeat the same subvi to all elements of your resource array, then you need to add a "for loop" with your subvi inside then wire the resource name array and it will execute several iterations (the same number of your array elements) one at a time and will output an array of responses. 

 

0 Kudos
Message 4 of 12
(338 Views)

if that's a cluster of resource names you may need to use a cluster to array function. 

 

0 Kudos
Message 5 of 12
(329 Views)

I have done that and that problem looks solved, but it has cascaded into not being able to connect to the next part which is a DAQmx Read.

The_Gadel_2-1710779831473.png

 

The_Gadel_1-1710779818442.png

 

 

0 Kudos
Message 6 of 12
(318 Views)

Hi Gadel,

 


@The_Gadel wrote:

I have done that and that problem looks solved, but it has cascaded into not being able to connect to the next part which is a DAQmx Read.


Your subVI (which is unknown to us) outputs a scalar float value "Pressure".

The loop creates an array of floats (aka "Pressures").

And you wire this array of float pressures to a DAQmx function, that is expecting a DAQmx resource. Do you see the error (now)?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 12
(300 Views)

You have readings from COM ports being used as DAQmx tasks.   Where are you supposed to get the second DAQmx task?  Or a better question would be what are you supposed to do with the data from the Comm Main?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 8 of 12
(291 Views)

i think you are wiring an array of double numbers to the resource of DAQMX. 

0 Kudos
Message 9 of 12
(234 Views)

I think its worth mentioning that I am a beginner who has been given a prewritten code. I am tasked to learning it and making some edits to it to work for another test setup. What I am doing here is replacing the NI-9203 card on the chassis (which was going to read the pressures) and replacing it with a subvi that will read the pressure gauges via USB. Realized that the DAQmx is not needed since I am not using a card anymore. My original question has kind of been solved with this method.

The_Gadel_0-1710787227883.png

 

Did not realize I had to index the array to get the separate functions rather than unbundling like a cluster. I am now working through how to connect it to my front panel cluster of gauges. 

The_Gadel_1-1710787311050.png

At this point I just need to troubleshoot more. Appreciate all the insight!

0 Kudos
Message 10 of 12
(203 Views)