LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronize 2 device 6025E and 1 counter

Hi,

I develop an application using 2 device 6025E. So on the first device, I connect a BNC 2090 that I use to connect AI and an encoder through the user BNC. (I wire the user1 BNC to the PFI8).
On the second 6025E, I connect a SCXI 1112 to measure temperature.
I acquire all data continuously and I want to save datas on DIADEM. But I m not able to synchronize the different AI and the counter. In a while loop, I synchronyze the 2 device with a RTSI and I add the VI measure buffered pulse. But it doesn t work.
You can find in file attachments my VI.

Thank you for your help, Franc.
0 Kudos
Message 1 of 8
(3,176 Views)
Hello Franc,

You can synchronize the start trigger of the counter with either the start trigger of the AI or the scan clock again. Within the task for the counter, you will need to call Counter Set Attribute.vi to first enable the start trigger. Then you will need to call Route Signal within the same task to drive the start trigger with the RTSI line. Drive it with RTSI 0 if you wish to synchronize with the AI scan clock, or use a different RTSI line and be sure to route the AI start trigger to the same RTSI line in the AI task.

As you did with the AI synchronization, control the program flow with the error handler. Be sure you call the Route signal vi's that drive certain lines before you configure that line as the source later. Add the additional coun
ter start trigger configuring before you program the counter (Counter Control.vi). Then be sure to program the counter before the start trigger will occur.

Please let me know if you have any further questions.

Kristi Hummel
Applications Engineer
National Instruments
0 Kudos
Message 2 of 8
(3,176 Views)
Hello Kristi,

Thank you for your answer but I some problem with the counter set attribute.vi
So I want to synchronize the counter with AI scan clock but I don t understand how to configurate counter set attribute.vi to enable the start trigger.
And what do you mean by add the additional counter start trigger. I joined my VI on the file attachements.

Best regard,

Franc
0 Kudos
Message 3 of 8
(3,176 Views)
Hello Franc,

I've attached a small bit of code taken from your counter configuration in your program. To summarize what I did, I called Set Attribute after the the Buffer config to enable the start trigger on the counter. Then I called route signal to drive the start trigger with RTSI 0. To integrate this into your program flow, add this snippet of code after you've fully configured the slave device for AI but before you start the slave's AI.

Hope this helps.

Kristi Hummel
Applications Engineer
National Instruments
0 Kudos
Message 4 of 8
(3,176 Views)
Hello Kristi,

Thanks a lot for your explanations.
As you recommened to me, I continue to control my program flow through the error and I integrate the counter program between the clock config of the slave device and the control start slave first.But I have an error out 10003 and I don t know which numeric parameter is invalid.So you will find my corrected VI on the file attachments.
If you could help me an other time, thanks

Franc
0 Kudos
Message 5 of 8
(3,176 Views)
Hi Franc,

I think you may have attached the old VI again. The 10003 error message may have suggested that it came from a particular VI. If so, check the parameters of that VI. I would suspect that you may have problems with the Counter Group Config. The parameters you orignally set for that VI were okay, but I probably did not include all of those in the code snippet.

Good luck!

Kristi
0 Kudos
Message 6 of 8
(3,176 Views)
Hi Kristi,

Sorry but I have still a problem. I forgot to precise that the error message concern the route signal.vi.
Moreover, I verify the parameters of counter group and it s OK and the parameter of route signal are correct.
So I try to add an other route signal between the clock config of the slave device and group config of the counter but it doesn t work and I have the same message error with no acquisition.
I joined the NEW vi.

Thanks, Franc
0 Kudos
Message 7 of 8
(3,176 Views)
Hi Franc,

Here's the problem with what I suggested previously. The STC counters do not have a start trigger; only the TIO chip on the 660x boards have this feature. The best you can do with the STC is either poll a digital line and start the counter when the line is high, or configure the gate of the counter externally such that the line is latched high when the analog input begins.
For more details, take a look at chapter 4 of the user manual: <>

Sorry for the confusion.

Kristi
0 Kudos
Message 8 of 8
(3,176 Views)