LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

digital I/O with cRIO 9472 and 9421 cards

Solved!
Go to solution
Solution
Accepted by topic author djsunkist

@djsunkist wrote:

This really looks much cleaner. Thank You.

With the register, I'm trying to accomplish "wait 'til the two numbers match before continuing."


My understanding is that you want to match the number coming out of the DAQ assistant with the number coming out of the random number generator.  A shift register stores data from one loop iteration to the next.

 

Do you want the the random number that is generated to persist until the match occurs with the DAQ assistant?  Or do you want the random number to change from loop iteration to the next as it is doing now?

 

If  want the random number to stay the same until the match occurs, then put that in a case structure.  Store the random number in the shift register until the match occurs at which time you put a new random number into the shift register.

0 Kudos
Message 11 of 14
(436 Views)

Okay, I've got everything clickin' except my output. I want to send the randomly generated # through the cRIO 9472 and out to an L.E.D. telling the user which station he needs to engage to match it. Here's what I have:

 

Capture4.PNG

 

 

I've read that you cannot use more than one DAQ in a loop, so how can this be accomplished?

 

Also, is there a way to store the number of cycles performed over multiple start/stops of the program?

 

 

As always, thanx for the help!

0 Kudos
Message 12 of 14
(435 Views)

You can't have more than one DAQ input task in a loop if they share the same resources.  So two different DAQ tasks that use different channels on the same DAQ module is generally not good because the shared resource is the timing engine of the DAQ module.

 

Outputs use a different DAQ timing engine, so having 1 input task and 1 output task is not a problem.

 

You might want to put a wait statement in the inner while loop so it doesn't run superfast while polling the DAQ inputs.

0 Kudos
Message 13 of 14
(431 Views)

Ravensfan, thanks for your patience and assistance!

 

"Everything is as it should be"  (Star Trek fan)

0 Kudos
Message 14 of 14
(428 Views)