Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

synchronize fgen 5412 niscope 5112

Hello everybody!

 

I really need your help! i'm struggling with this task and i could not find the rigth solution.

 

Ditial trigger is performed by using the internal RTSI cable on channel RTSI/1, instead the clock is passade throught the RTSI/0 cable.

I'm trying tho use the master/slave configuration.

 

I want that when i push the bottom "run" on the run the generator function, fgen has to start sending the signal and niscope start to acquiring recording.

It is very important that fgen and niscope are perfectly synchronized.

 

I have found some examples, but with fgen and niscope on the same vi.

 

Can somebody help me please? It's very urgent!

 

Many many thanks,

Jane Davis

0 Kudos
Message 1 of 2
(2,839 Views)

Hello Jane,

 

The old 5112 device does not offer many possibilities to synchronize with other devices. In particular, the TClk functionality is unfortunately not available for this device.

 

All you can do with the 5112 is exporting the 10 MHz reference clock. So, you will have to rely on that clock to synchronize with the 5412. Here is how I would do it:

 

  1. Export the reference clock of the 5112 on RTSI bus.
  2. Set the start trigger source of the 5112 to RTSI bus.
  3. Run the 5112. It will wait for start trigger.
  4. Set the input sample clock source of the 5412 to RTSI bus.
  5. Export start trigger of 5412 on RTSI bus.
  6. Set the start trigger source of the 5412 to software edge.
  7. Run the 5412 and send a software start trigger.

Thanks to the RTSI bus, it should not be a problem to have both generation and acquisition in separate VI as long as you follow those steps and run first the 5112 VI. Also, as you talk about RTSI cable, I suppose you have PCI devices. Then, don't forget to register your RTSI cable on MAX and add your devices to the cable.

 

That said, let me give you some advices. I think it will be much clearer if you can use only one VI. Start by clearing your two existing VI.  Those few tips can help you:

 

- Remove unnecessary code from your VI (especially if using examples VI)

- Use straight wires whenever possible

- Use shortest wires as possible

- Do not make too large structures (loop, cases) with empty areas

- Do not superpose wires

- Do not hide wires (under structure borders, …)

- Use subVI

- Make clear icon for subVI

 

Then it will not be a hard work to combine both VI into a single one.

 

I have attached, as example, a VI doing the synchronization between both devices. Unfortunately, as I don’t have the exact hardware available, I was not able to test it. Anyway, it should give you the idea. If you try it, be sure to double check the constant names which can vary for you (RTSI lines,...). Also, don't take it as a fully working example.

 

Let me know if you have any issue.

 

Disclaimer: The example Code is provided As Is. It has not been tested or validated as a product, for use in a deployed application or system, or for use in hazardous environments. You assume all risks for use of the Code and use of the Code is subject to the Sample Code License Terms which can be found at: http://ni.com/samplecodelicense

Cédric | NI Belgium
0 Kudos
Message 2 of 2
(2,821 Views)