LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with Sort 1D Array.vim and VI Refnum

Solved!
Go to solution

Hello all,

 

I am having an issue using the Sort 1D Array.vim which allows you to pass in a custom "less-than" function to sort things.

In my case particularly, I am sorting DAQmx physical channels by order of PXI#, Slot#, and then ai#.

 

I have coded the less-than function this way:

Code.png

 

When I attempt to connect this to "Sort 1D Array.vim", I get this:

weird.png

 

I seemingly have done this correctly, however, it doesn't work...

 

I would greatly appreciate some help.

 

 

0 Kudos
Message 1 of 9
(1,294 Views)

If you look at the shipping example (lesson 2a), the connector pane is actually different for the VI refnum scenario. Maybe change to that and see what happens....

 

altenbach_0-1645479941947.png

 

0 Kudos
Message 2 of 9
(1,283 Views)

I switched the tunnel pattern to match that example but I still get broken wires when attempting to wire it into Sort 1D Array.vim...

0 Kudos
Message 3 of 9
(1,277 Views)

It would help if you could attach the VI.

0 Kudos
Message 4 of 9
(1,275 Views)

Attached is the "less-than" VI for DAQmx physical channels.

I also attach a vi demonstrating the various ways i've attempted to connect this to 1D sort.

 

(I'm using LV2021)

Download All
0 Kudos
Message 5 of 9
(1,269 Views)

Sorry, I only have LabVIEW 2020 here...

0 Kudos
Message 6 of 9
(1,249 Views)

Attached LV2020 version

 

Thanks for trying to help!

Download All
0 Kudos
Message 7 of 9
(1,245 Views)
Solution
Accepted by topic author Gryffin

removing the two extra terminals again, it is unbroken here using the strictly typed static reference.

 

altenbach_0-1645483846920.png

 

0 Kudos
Message 8 of 9
(1,215 Views)

altenbach,

 

Thanks for your help. I made a stupid mistake and didn't wire up the array of DAQmx physical channels to the array input before connecting the VI ref. Works fine now.

0 Kudos
Message 9 of 9
(1,198 Views)