05-15-2012 03:37 AM
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
05-18-2012 08:07 AM
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:
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