I have written a LabView program in which I select two oscilloscopes connected on two USB ports of the same computer and want to acquire data right after the trigger.
When the VI is run, only one scope comes in "waiting for trigger" state and acquires the data after the trigger.
As the trigger occurs, the second scope shows ready state and acquires the data in next trigger.
I want to get the data by both scopes on a single trigger.
Thanks in anticipation.
Well, step 1 is show us the code.
But it sounds like you have a dataflow dependency between the two calls, and so the second call only starts after the first call finishes.
To correct this, ensure that neither of the two tasks have a dependency on the other.
Ok Thank you for your response.
I have attached the image of the Bolck diagram.
Thank you in Anticipation.
You have a Flat Sequence Structure with three (visible) frames:
The nature of a FSS is to prevent sequential frames from occuring at the same time.
Based on the code you show in the png, there's no way these can occur at the same time!
You could choose to merge the second and third frames (right click on the border and choose "Merge Frames" is I think the term) and then it will probably do what you want.
Also, why not place the TF Current, CS Current, VF Current and Rogowski Coil Current indicators directly at their measurements? What is the purpose of the Local Variables?
As a possible follow-up, I'd suggest creating a Cluster with the necessary controls to specify a single channel, making it a typedef, and then using that to configure your channels.
You could then use a For loop and an array of that cluster to have 4 channels on the front panel more easily configurable.
This is an example I wrote for you with the Agilent driver that ships with LabVIEW. You could do the same with your Tektronix system:
Note that I didn't create a typedef for the "Configuration" .ctl I used here, but you should for yours!
To be clear, the contents of your cluster would be the Ch Number, Vertical Coupling, Probe Attenuation, Vertical Range + Offset, and Bandwidth settings. You could then output just the Channel Number as an indexing tunnel, and get the array you need for the Multiple Waveforms measurement without having to use a Build Array node.
Thank you very much for making the front panel beautiful for me. Definitely I will follow your instructions after I troubleshoot the issue asked in my posted question.
I have made the changes i.e., merging frames and removing local variables.
But the problem persists.
I state the problem again as follows:
When i run VI, both scopes are configured automatically and first scope comes in state of waiting for trigger and the second one not.
As the trigger comes, first scopes gets triggered and gets data. As the first scopes completes work, the second scope gets ready and waits for trigger.
I need both to get the data at the first trigger.
From what I can see in your latest picture (2scopesd.png, 60KB) there isn't anything that would cause them to wait for one-another now.
Can you open the VI with "Multiple Waveforms", 45000 and the array of channels (Read, or something probably) and then do the following:
It may be that the Read VI only allows a single call site at a time. In that case, I'll try taking a closer look at some documentation or downloading the driver, but you might (might) be able to change it from "Non-reentrant" to "Preallocated reentrant" and see if that makes a difference. Know that if it is set to non-reentrant, you should be careful changing it because the programmer who created it might be relying on that property...
Of course, it may already not be non-reentrant, in which case, I'm not sure what the problem is!
I attache the screenshot here. By default, it was at "Non-Reentrant Execution". I changed it to "Pre-Allocated Clone Reentrant Execution" and run the program again but the same response.
So following your latest comment I downloaded the driver and checked the code inside.
All of the contained VIs in "Read (Multiple Waveforms).vi" are non-reentrant.
In some cases, this isn't a huge problem (because the VIs will be fairly fast) but in at least one and perhaps two cases, this is causing you a problem.
I just want to also check that when you have the two instruments set up, they're not sharing any part of the communication circuit? So long as they're connected separately, changing both of
should be enough to get you what you want. I'd probably also try setting "Initiate.vi" to preallocated to reduce the chance of missing an edge by a narrow margin, but I expect it isn't strictly necessary.
Good luck 🙂