ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

A simple 6024E time question

Dear all,
I want to record data using 6024E board
I have attached a VI, I hope that program be able to record the data and turn on/off the LED on the certain time. The 'time' must be controlled by the on-board counter. The counter part is copyed from the example, the only thing I change is added case structure to turn on/off LED
I have no idea why that doesn't work
could you please tell me what mistake I have made

thanks
0 Kudos
Message 1 of 6
(3,082 Views)
Hi Sai,

Before I get into debugging your program, can you tell me what LabVIEW version and DAQ version you have? If you have LV 7.x there may be easier (DAQmx) methods of obtaining the result you desire.

Thanks,
Sal
Message 2 of 6
(3,082 Views)
Hi Sai,

After looking at your code, let me describe what it will do.

The counter will count events.
At each loop iteration the value of the array (starting at zero) will be compared with the current count. If they are equal, the LED will turn on and off based on the boolean array's value. The array position is incremented. When the counter reaches the second value of the numeric array, the LED will change to the second value in the boolean array. The LED will only change states when the counter reaches a value that is in the array. The LED will cycle through the states that are defined in the boolean array.

Is this what you want to accomplish?

I did notice one thing in your VI. The case statement has nothing wired for the "false" c
ase. The output of the case statement is set to "default." This means that each time the case statement executes with "false," the default value will be passed through. Try wiring the count number through the case "false." This will make sure that the count number stays the same in the "false" and increments in the "true" condition.

One last thing, what DAQ device do you have?
Message 3 of 6
(3,082 Views)
I have labview 7.0
and DAQmx

thanks
0 Kudos
Message 4 of 6
(3,082 Views)
Thanks for you reply
I have followed you idea to change the 'default' case. However, the LED still doesn't on or off(no response at all). If my time arrary is from 1-10sec, the counter on the front panel will update the value only after 10 sec.
I use DAQ 6024E connected with a EEG amplifier
0 Kudos
Message 5 of 6
(3,082 Views)
Hi Sai,

Since you are using the 6024E and have LabVIEW, I would suggest using DAQmx. It will make your DAQ programming go much easier. Also, the code will be more likely to work with future devices and versions of LabVIEW.

To see a DAQmx counter example.... go to Help >> Find Examples >> Hardware Input and Output >> DAQmx >> Counter Measurements >> Count Digital Events. Here you will see the simple counter examples.

I would suggest looking at this and try to incorporate your LED function into it.

About your current program, what are you initializing the numeric and boolean arrays to?
0 Kudos
Message 6 of 6
(3,082 Views)