LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to avoid a cycle

I'm trying to write code that runs a stepper motor and checks limit switches to see if a gate is open or closed (each limit switch has a valid range to trigger) if the limit switch triggers outside of these windows then I need to log this information.
From the code I've attached I'm having a problem when I wire the open leads of the 2 equal to comparisons to the step count indicator, I get a "Equal is a member of a cycle". I'm lost!

Also in the logic for the case, I want to complement the selector how can that be acheived?

Thanks

Ron
0 Kudos
Message 1 of 3
(2,611 Views)
In your code, the step count indicator value is an output of the upper and lower limit operation, that is why you are getting a cycle error. Instead wire the input of the equal sign to the shift register ( on the left). You may have to intialize the shift register to some value.

to complement a boolean operation, just right click on an input.output and select invert.
0 Kudos
Message 2 of 3
(2,611 Views)
Try wiring the equal function terminal from the left hand shift register terminal instead of just after the Case structure.

You're getting the error because the Case structure must have data from the XOR gate, which must get data from both Equal functions. This can't happen with the value connected from the right side of the CAse structure because the Equals can't run until they get a value out of the Case, which is waiting for the XOR, which is waiting for the Equals........

Ed


Ed Dickens - Certified LabVIEW Architect
Lockheed Martin Space
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
0 Kudos
Message 3 of 3
(2,611 Views)