LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Odd behavior of a shift register

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 resultsProbe results

Fig 1. Probe results

Left Part of Program DiagramLeft Part of Program Diagram

Fig 2 - Left part of the Main VI

Right Part of Program DiagramRight Part of Program Diagram

Fig 3 - Right part of the Main VI

 

Wiring Detail - the little arrow on the shift registerWiring Detail - the little arrow on the shift register

Fig 4 - Wiring details with the previously mentioned arrow

0 Kudos
Message 1 of 5
(218 Views)

One of you other cases changes/clears the cluster.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 2 of 5
(216 Views)

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.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
Message 3 of 5
(202 Views)

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.

Message 4 of 5
(161 Views)

Many thanks.

 

Indeed there were some cases that slipped me. Once I connected them properly, everything worked smoothly!

Kudos to all!

0 Kudos
Message 5 of 5
(86 Views)