From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx synch

I thought my synch project in DAQmx (PXIe-6124) was done. But I found there is an error in routing one of counter signal to function generator (PXI-5421) internally. I would like to shoot my trouble in step by step.

 

Device: Function generator and Single DAQmx-AI(2 channels), AO(2) and Counter(sample clock for AI&AO, trigger signal to the function generator) 

 

Purpose: Sync in starting with all channels above and function generator and same same rate in AI and AO.

 

Method (described in sequence).

1)Ctr0 setting with reference clock source (PXI_Clk10). Ctr0 is used as an sample clock source in AI, AO (So, sample rate is the same in AI and AO).

2)AI setting with reference clock source (PXI_Clk10). The start trigger source was taken in AI and then transfered to AO.

3) AO setting with reference clock source (PXI_Clk10). The start trigger source was transfered to Ctr1.

4) Ctr1 setting with reference clock source (PXI_Clk10). tried to route to PXI_Trigger line 5 using CO pulse Term property.

5) Function generator setting. PXI_Trigger line 5 was used.

6) Start Task.vi of Function generator.

7) Ctr1, AI, AO start task.vi

😎 Ctr0 start task

 

Trouble: When I route Ctr1 to function generator, I can't route for the first time just after labview launching or clean booting of computer.

             But the Ctr1 can be routed without problem after route to normal counter port(PFI) "at least" one time.

 

Question:

1) I used the same sample clock in AI and AO. Do I have to use PXI_Clk0(reference) in ONLY one of AI and AO?

2) is the order of setting before running start task.vi so important? I thought anything is not happened before starting Ctr0 channel.

3) When I route Ctr1 to PXI_trigger line, the orginal PFI port in DAQmx was still alive. is it normal?

 

I am editing my codes for posting.

But, I would like to ask basic questions about the trouble then resolve it.

 

labmaster. 

0 Kudos
Message 1 of 6
(2,799 Views)

I attached my codes for testing only in DAQmx.

 

I don't understand why I can't export counter signal to PXI_Trigger line for the first time.

 

In only newly booted computer,  the counter signal was not exported.

 

labmaster.

0 Kudos
Message 2 of 6
(2,776 Views)

Hello labmaster,

 

I am confused as to what you mean when you say you cannot route the signal the first time.  Does this throw an error when you try to make this connection?  If so which one?  

 

On your questions:

1) you can use the same PFI line for the clock for both your AI and AO.

 

2) the order only matters as far as the order of execution that you wire it, but for your I/O it will not make a difference.

 

I am unsure of what you mean when your PFI line is still alive. When you route a signal from a PFI line to somewhere else, you will still see that signal on the original PFI line.  

ColeR
Field Engineer
0 Kudos
Message 3 of 6
(2,740 Views)

Hi, ColeTrain:

 

Thank you for the interesting to my problem.

 

I would like to describe my procedure to see my problem.

 

First, restart computer for virgin state.

 

2. launch labview.

 

3. open my attachment then run the code with export-Switch on. -> Stop Result: I couldn't watch the counter signal in PFI port. and not route internally

    ( No error message, and operated in normal other counter as well as AI/AO) 

 

4. run the code with export-SW off.  Result: I can see the coutner signal in the port. Really route internally.

 

5. run the code again with the switch on again. Result: same as 4.

 

I don't understand why I can't route the counter signal interally for the first time just after booting.

I attached newly edited version (deactivate complex things except start trigger)

 

labmaster.

*)Does anyone test my code in different DAQmx? I am in PXI module.

Message Edited by labmaster on 06-15-2009 08:54 PM
0 Kudos
Message 4 of 6
(2,729 Views)

This is right for #4 & 5 steps. 

4. run the code with export-SW off.  Result: I can see the coutner signal in the port, but not route internally.

 

5. run the code again with the switch on again. Result: the counter signal is routed to Trigger_line 5 and could be observed in PFI port.

 

labmaster.

Message Edited by labmaster on 06-15-2009 09:03 PM
0 Kudos
Message 5 of 6
(2,725 Views)
labmaster, I have taken a look at your code and there is a lot going on to it.  You have a number of disable diagrams and wires that run in a number of directions that makes it hard to figure out what your code is doing.  You may see more help on the forums if you clean up your code a little bit and try to simplify your code down to a point that isolates your problem.
0 Kudos
Message 6 of 6
(2,694 Views)