LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VXI and FDC/VISA

Looking for any guidance on how to properly configure LabView to communicate
using the Fast Data Channel properties of a VISA node. I have a Tektronix
TVS641 that I'm trying to communicate with through a NI MXI in slot 0 of a VXI
crate. I can easily transfer data by directly communicating with the TVS
device, that is if I send the appropriate INIT and the DATA? commands, I
receive the data using VISA Read, no problem. If I ask the TVS to copy data to
the FDC (always FDC channel 1 on the TVS), set the INIT to count more than 1,
the TVS is then supposed to dump the data acquired during each cycle to the
FDC. I believe I have these set of commands correct. My questions is: how do
I configure the VISA attributes correctly and then read t
he data from the FDC
using a VISA read in LabView? I follow the recommended guidance from Tektronix
in their C++ example, that is I open two VISA sessions to the device, the first
to write ASCII and the second to receive from the FDC. In setting the second,
I set the following properties of the VISA session: FDC Chan to 1, FDC mode to
stream (the same as the TVS device), and leave the other two FDC properties to
default (false for use pairs, and false for sig send en), as well as set the IO
Prot to 'FDC'. I then send an INIT command, I can trigger the TVS with no
problem the appropriate number of times, but as I try to VISA 'Read' the FDC, I
get nothing until timeout (easily set long enough to allow data to be sent and
received), even after all the triggers have been processed. The Tektronix C++
example shows it is not necessary to directly ask for 'DATA?' specifically,
only to use a VISAREAD to get the data. I have the 'byte count' to receive
(buffer) for the VISA Read set to mo
re than enough to receive the miniscule
amount of data to be returned to my '.vi'. Any help is greatly appreciated.
Thanks!

Tom
0 Kudos
Message 1 of 3
(3,048 Views)
Tom:

What version of NI-VXI and NI-VISA are you using? Is this a VXI-MXI or VXI-MXI-2?

Do you have a C++ compiler that would allow you to test out the sample code given to you by Tektronix? I think it would be particularly useful to see the behavior of your system with that code compiled and running.

What value do you have your timeout set for? It might be worth setting it to an extremely large value (10 seconds) just as a test procedure to verify that that isn't the problem.


Trey Hamilton
National Instruments
Applications Engineer
http://www.ni.com/support
0 Kudos
Message 2 of 3
(3,048 Views)
Trey,

Thanks for the reply, I really appreciate it! Figured out the problem
late Friday afternoon.

After further investigation (and those handy 'probes') the past few days
(and a lot of frustration), I figured out that I was unable to set the IO PROT
to FDC correctly. Where I thought I was setting the value to two, turns out
LabView was keeping it as a one. This was due, I believe, to the fact I had
opened up the VISA session as an 'ASCII' channel first, and then opened up a
duplicate session for FDC. The duplicate session would not allow me to reset
the FDC IO PROT to a value of 2, no matter what I did. Didn't make sense to
me. Regardless, I set the IO PROT to 2 when opening the FDC channel first,
then opened a duplicate channel which kept the
default value of 1 for my ASCII
transfers, and lo and behold, the FDC works like a champ.

Thanks again for your time!

Tom

>Tom:
>
>What version of NI-VXI and NI-VISA are you using? Is this a VXI-MXI
>or VXI-MXI-2?
>
>Do you have a C++ compiler that would allow you to test out the sample
>code given to you by Tektronix? I think it would be particularly
>useful to see the behavior of your system with that code compiled and
>running.
>
>What value do you have your timeout set for? It might be worth
>setting it to an extremely large value (10 seconds) just as a test
>procedure to verify that that isn't the problem.
>
>
>Trey Hamilton
>National Instruments
>Applications Engineer
>http://www.ni.com/support
>
>
>
0 Kudos
Message 3 of 3
(3,048 Views)