From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

help needed.

hello all.

 

i'am currently struggling with the following.

 

 

i'am using for my hardware 1 PXI-6220 tied to 1 TBX-68 terminal block and 1 PXI-6224 TIED to 2 TBX-69 terminal block 

there are 9 (48 pin connector each) where the same pins on every connector is at same potential and are conected to a given pin starting from the 6224 all the way to the 6220. (example pin 1 of all connectors is connected to ai0 of pxi-6224 pin 44 to pxi-6224 ai12)

 

the user can select a given sensor(s) up to three to do a chart recorder of any two to do an xy graph.

a given sensor may have the followig parameter: [PXI1Slot2/ai#, or PXI1Slot3/ai#] one slot for each card, also the task name it belongs ex: Pressure, and finally the range ex:0_3000 psi

 

the xy graph part i have been able to succesfully capture any two possible sensors.

but on the chart recorder part, iam struggling having more than 3 sensors.

 

i will post a subvi that has 2 1 d arrays 1 being tasks names and the other being channels names.

 

i have 1 1D string arrays, that can have up to 9 element, and there can be 1 or more, up to 9 element repeated.

the possible strings are [velocity, angular position, torque, pressure, load, current, voltage, acceleration].

this strings are DAQ task names.

there is a 2nd 1D array that shares the same parameters as the first only that the strings this time are channel(s) within a given task (example for the pressure task a possible range could be 0_3000 psi)

 

i would like to compare element 0 with the rest of the elements and see which ones are repeared also get the indexes and how many times it repeates, do that with all the elements (ex say array has [A,B,C,D] A=B?, A=C?, A=D?, B=C?, B=D?, C=D?  and then determine which channels belong to the given tasks

 

i tried to be as most explicative as possible, but even still maybe it is a bid messy to underestand.

the variant i used in this subvi is not much elegant but it works for any three different sensors

i will apreciate any help in this matter.

 

i have been looking at type cast so i can isolate on structures the subvi output.

 

0 Kudos
Message 1 of 3
(2,234 Views)

I didn't spend lots of time evaluating your logic but a few things you may want to consider which will help others looking at the code. Reduce the size of your block diagram. It is HUGE. Most of it is empty space so it can be reduced in size significantly. A good rule of thumb is to keep the block diagram to a single screen size and these days a good size is 1600x1200.

 

Secondly you might want to consider using combinational logic for your case selection rather than tons of netsted loops. The combination logic expands better when you have multiple conditions.

 

Here is a very simple example.

 

Case Selection Methods.png

 

As for your specific questio I apologize I don't have the time to dig through it. I thought the above suggestions may help though.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 2 of 3
(2,210 Views)
thanks for the replay, at least i learned something new, (the explanation of the middle case structure, i will try to look at my problem from another point of view.
0 Kudos
Message 3 of 3
(2,182 Views)