07-30-2009 01:49 PM
I would like to use the VISA API to work with the modules in my PXIe-1062Q chassis. I have the following modules installed in the chassis:
1. NI PXI-5102 (scope)
2. NI PXI-5402 (fgen)
Register-based instruments like PXI modules are new to me i.e. I have only worked with message based instruments so far. I had a number of questions on how to work with these devices using VISA, let me start off with two of the most pressing issues for me right now: 🙂
1. I don't quite understand how hardware triggering works within a PXI chassis. For example, if I am working with the PXI-5402 (fgen) and I want to issue a hardware trigger on TTL0 that the PXI-5102 (scope) can listen to, how would I set this up? From what I see in the NI-VISA help, the attribute VI_ATTR_TRIG_ID allows you to specify the hardware trigger line (TTL0 - TTL7) for a device. Once this is done, I am (apparently) supposed to use the function:
viAssertTrigger
with the value: VI_TRIG_PROT_RESERVE
to "reserve" the line. It's unclear to me as to whether or not that produces a trigger on TTL0. At this point, I assume that if I wanted to the PXI-5102 to be triggered by TTL0, then I would set the VI_ATTR_TRIG_ID to TTL0 for this device as well? Also, what is the difference between setting up VI_ATTR_TRIG_ID to TTL0 for the device (INSTR resource) Vs. setting up VI_ATTR_TRIG_ID to TTL0 for the chassis (BACKPLANE resource). What happens when I use viAssertTrigger in each case?
2. My other question concerns using the PXI modules using ONLY VISA commands (I'd rather not use NIFGEN and NISCOPE at an API level). I understand how to use ViPeekN (N=8,16..etc.) and ViPokeN to read and write to/from the PXI Configuration register. What I don't understand is how to use functions like ViMoveIn, ViMoveOut etc. to operate the modules, for example, make the PXI-5402 generate a sine wave. In other words, where can I find an explanation of how to control these PXI modules and get / send data to them using the VISA API. It seems like I need documentation that explains how to issue commands to these register based devices, what addresses to map to, where to read data from etc.
Thanks,
Solved! Go to Solution.
08-03-2009 02:42 PM
Is there any particular reason you do not want to be using the instrument's specific drivers and would rather use the register level programming?
You may want to checkoutthe Measurement Hardware Driver Development Kit and see if that has anyusable information for you.
08-04-2009 08:37 AM
Hi Doug,
Thanks for your response. I'm looking at register level programming as an option because I am familiar with the VISA standard and I would like to take advantage of the speed that "Register-based" instruments are capable of. The "Measurement Hardware Driver Development Kit" that you pointed to seems to be specific to data acquisition devices. While it does detail the register maps for data acquisition devices (lie M series or E series DAQ boards), there is no documentation on register maps for PXI instruments (F-GENS, scopes etc.).Is register map information for PXI instruments published in a similar format?
Thanks much,
08-05-2009 03:12 PM
08-06-2009 06:38 AM
Thanks for looking into this Doug! I appreciate it,
08-07-2009 09:40 AM