04-08-2024 09:54 AM
Hello,
I am currently in the process of creating a program to work with a laser and a DAQ device (Fig 2 and 3). I use two two Type Definitions - IR Settings Cluster and DAQ Settings Cluster - to carry the required settings to my state machine.
I noticed that my program crashed stating that I have set an incorrect value to my DAQ (the SampleClock was set to zero).
The probe test result is shown on Fig.1 - Odd probe numbers pertain to the IR Settings Cluster, and even numbers pertain to the DAQ Settings Cluster. After setting these up (see Figures 1, 2 and 3), I managed to notice that the data regarding the DAQ is not carried properly at probe #12, whereas the data of the IR Settings cluster is carried out properly. I also noted that the IR Settings Cluster tunnel at the event selector (probe #12) has a little arrow, unlike the DAQ Settings Cluster, and I am currently trying to understand its meaning. The content of the clusters can be seen on the "Unbundled by Name" functions.
Any help to understand why the correct values are not carried properly would be greatly appreciated.
Should the actual code be needed, I will be most willing to share it, but be advised it is rather heavy - that will mean that it will have to be dowloaded from an external source.
Thanks in advance!
Probe results
Fig 1. Probe results
Left Part of Program Diagram
Fig 2 - Left part of the Main VI
Right Part of Program Diagram
Fig 3 - Right part of the Main VI
Wiring Detail - the little arrow on the shift register
Fig 4 - Wiring details with the previously mentioned arrow
04-08-2024 10:00 AM
One of you other cases changes/clears the cluster.
04-08-2024 10:07 AM
I suspect Yamaeda is correct.
The little arrow is just telling you that the left and right tunnels are linked. They will automatically wire themselves together if you add a new case.
04-08-2024 11:33 AM
Yes, you'll need to check every possible case of your large case structure to find what is clearing it.
The most likely culprit in my experience is that you have another nested structure that it passes through that has "Use default if unwired" as the exit terminal on it, which tend to be event structures or disable structures as those have the "Use default if unwired" option on by default (unlike most other structures where you have to actively choose it).
It could also be that you have it passing through a FOR loop that was set to run zero iterations, or that you pass it through a subVI that doesn't connect its input terminal to its output terminal correctly.
04-10-2024 06:46 AM
Many thanks.
Indeed there were some cases that slipped me. Once I connected them properly, everything worked smoothly!
Kudos to all!