Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronize error for 2 5102 trigger

For only 1 channel, it works fine, but I need 2 channels to start trigger at same time. Then I changed the code to run 2 channels, but has run time error as screen shot.
 
Any suggestion?
 
0 Kudos
Message 1 of 8
(3,629 Views)
Hey Turbot,

Thanks for contacting National Instruments support.  If you want to synchronize two channels on the same 5102 you simply add both channels to the channel list by typing 0,1.  I have a attached a vi that does this.

That said if you want to synchronize both 5102 devices together, than that is a bit more complicated, but there is a shipping example that does just that.  It is located C:\Program Files\National Instruments\LabVIEW 8.2\examples\instr\niScope if you have LabVIEW 8.2, but yo have an older version of LabVIEW it would located in that folder.  It is also in the Example Finder, and if you go to the Start >> All Programs >> National Instruments >> NI-Scope >> Examples, and then the LabVIEW version you have.  The name of this example is niScope EX 5102 Synchronization.vi

Let me know if you have further questions or cannot find the example I am describing.

Regards,
Kenn North
Principal Product Manager - Search, Digital Analytics
http://ni.com/search
0 Kudos
Message 2 of 8
(3,618 Views)
I tried to follow the same, but only the master card can be triggerred, the slave one cannot be triggerred.
The only difference is I  use a 20Hz clock at PF1 for the master card's trigger.
0 Kudos
Message 3 of 8
(3,614 Views)
Hey turbot,

I may be misunderstanding what you are needing.  I can run the example and both trigger because the trigger event is exported to RTSI 4 and then used to trigger the second device.  Are you wanting to to something else, like trigger the 2nd device at a different time?  You code is very similar to the example so I am missing what it is you are trying to accomplish.  I also set it up to do a digital trigger with PFI 0 and they both still trigger. 

Let me know if you have further questions.

Regards,
Kenn North
Principal Product Manager - Search, Digital Analytics
http://ni.com/search
0 Kudos
Message 4 of 8
(3,610 Views)

Now it can work.

After get the data from DAQ card, I tried to write to binary file and read the same file.

But the array size not same from read and write.

Also what is the better way to do so? Can I use float type instead of int.

Thanks,

0 Kudos
Message 5 of 8
(3,603 Views)
Hey Turbot,

I am missing some vi's that you used, like the 5102_pfi_output.vi, but you can read a double from the card just by change the polymorphic Read vi's in the loop.  Just select Multi-Waveform 2D DBL.  This will give you back the double float you are requesting.  I'm not sure where you are reading back, that must be in a different vi.

Regards,
Kenn North
Principal Product Manager - Search, Digital Analytics
http://ni.com/search
0 Kudos
Message 6 of 8
(3,603 Views)


the 5102_pfi_output.vi is in the first post of this series.
0 Kudos
Message 7 of 8
(3,588 Views)
Hey Turbot,

I missed that vi up above.  Were you able to get it working with doubles?  Also, what are you reading it back with, and how different is the size, just slightly off, or is off by a mulitple of 2 or something?

Regards,
Kenn North
Principal Product Manager - Search, Digital Analytics
http://ni.com/search
0 Kudos
Message 8 of 8
(3,577 Views)