04-30-2025 02:33 AM
I'm new to LabVIEW and have been learning by using example codes. It's been challenging, but I've managed to achieve the desired output, even though my code isn't very clean.
I'm now rewriting the code and realize I lack knowledge in certain areas. I'm testing a system connected to 432 sensors via a multiplexer using the USB-6363 and two custom PCBs. I'm looking for a better way to organize and evaluate my results.
Here's the tricky part: each sensor (or channel) has 5 ICs, each providing 2 Boolean outputs and 3 numeric outputs. Additionally, there are about 5 more Boolean outputs to ensure the serial connection with the multiplexer is functioning correctly. This totals to 15 Boolean outputs and 15 numeric outputs per channel.
I want to create a kind of dictionary to store this data while the cases are running, and then evaluate all outputs at the end. How can I save these outputs so I can easily refer to each channel directly or log the data after the code has finished running?
04-30-2025 02:55 AM
I would just put the information in an array of clusters, but a Map should work (or variant property if you're going more old-school). Name/Number the sensors and use the just mentioned cluster as data. That way it should be easy to store/pull the information needed.
04-30-2025 02:58 AM
Hi khaledag,
@khaledag28 wrote:
How can I save these outputs so I can easily refer to each channel directly … ?
Use Key-Value pairs…
Which LabVIEW version do you use? Since several versions there is a "map" datatype, that will implement those key-value pairs easily. (In older versions you could implement the same using Variant attributes…)
04-30-2025 03:01 AM
I am using LabVIEW 2022 Q3, I will see how I can implement the map you just mentioned, thank you.
04-30-2025 03:03 AM
Will that also work if I want the data of each channel to remain in the memory? or should it be reseted after every channel?
04-30-2025 03:32 AM
Hi khaledag,
@khaledag28 wrote:
Will that also work if I want the data of each channel to remain in the memory?
The data stay in memory as long as you keep the data alive: "THINK DATAFLOW!"
So as long as you keep the map (or the variant) in your running VI the data will stay in memory!
@khaledag28 wrote:
or should it be reseted after every channel?
When you want to reset the data then you need to implement this behaviour…