LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

can't run encoder counter task and pulse output task same time?

Hello All,
I am try to make a encoder task (CTR0) with a z-signal to reset counter periodically. The question is my z signal has a too long time staying in high state so it prevents the counter from counting for a very long time which is not acceptable for my applicaion. So I am build another retriggerable Pulse output task (CTR1) to "transfer" this original z -signal to a much shorter new signal which is used to feed CTR0 z terminal. I also did manual connection in the connection box.
The problem is, I could only run one of the task at a time, no matter which CTR0 or CTR1 task. This is very strangle and I couldn't understand at all.
Please have a look on my vi and give me some help
 
Thanks
 Feilong
 
 
0 Kudos
Message 1 of 2
(2,436 Views)

Hi Feilong,

Both types of counter tasks you are using take one counter to operate so they should be able to run at the same time. You may want to specify the pulse generation task to only generate one pulse per trigger. If you are generating multiple pulses per trigger then the task will require both counters. You can specify only one pulse by adding a DAQmx Timing VI to the task. You can set it to implicit with finite samples and 1 for the number of samples. If this does not clear up your problems then I have some questions to help narrow down the cause

  1. Are you receiving any kind of error from your program? If so what is the error code?

  2. What DAQ card are you using and what version of DAQmx?

Let me know if you have any questions. Take care.

Thanks,

Nathan
NI Chief Hardware Engineer
0 Kudos
Message 2 of 2
(2,418 Views)