Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

ViMoveAsync

I am trying to program an Tabor3362 arbitrary waveform generator to receive a waveform in DMA mode. In the operating manual, it is explained that one should use the DMA ON or DMA OFF commands and, in between, an I/O routine, such as ViMoveAsync, to transfer the data. Could anybody give me a hint on how to do this?

Thank you in advance,
Adrian
0 Kudos
Message 1 of 4
(3,186 Views)
Adrian,

I downloaded the manual for your instrument just to be sure I understood what you are talking about, but the viMove command is generally only allowed when you are talking to a VXI chassis rather than a specific instrument. I searched through Tabor's documentation and could find no example of them doing this. I was able to find the IVI driver and other useful tools at www.taborelec.com, if that helps you at all. You can find more information on viMove in the VISA Programmer's reference manual here:

http://digital.ni.com/manuals.nsf/websearch/87E52268CF9ACCEE86256D0F006E860D?OpenDocument&node=132100_US

I would recommend contacting Tabor, because it seems like we're missing something here. What environment are you trying to develop in, by the
way?

Scott B.
National Instruments
Applications Engineering
Message 2 of 4
(3,186 Views)
Hi Scott,

Thank you for your answer. Actually, I have their programs, but I even had some problems with the drivers for LabView.
They also have a standalone program that controls the instrument functions. I used NISpy to check what is used for waveform transfer. I do not know VISA programming, but the lines that were in between the instructions for setting "DMA ON" and "DMA OFF" were:

9. viEnableEvent (0x0060C5BC,0x3FFF2009,1 (0x1),0 (0x0))
10. viWriteAsync (0x0060C5BC,"........................",24000 (0x5DC0),0x04040001)
11. viWaitOnEvent (0x0060C5BC,0x3FFF2009,12000 (0x2EE0),0x3FFF2009,0x0061C55C)
12. viDiscardEvents (0x0060C5BC,0x3FFF2009,65535 (0xFFFF))

Now I am sending waveforms without DMA, but it is rather slow. Is there any simple way
to implemet that code using LabView6.1?

Adrian
0 Kudos
Message 3 of 4
(3,186 Views)
Adrian,

It appears that the software is simply doing a VISA Write asynchronously with a large data chunk (24000 bytes). You don't have to do the write asynchronously as the instrument sees little difference, but LabVIEW will do it for you by default. The write in LabVIEW may look slightly different in NI-Spy, but I think it will work fine if you just write "DMA ON", write your data with the usual VISA Write VI, and then write "DMA OFF". The important part is to figure out exactly how the instrument wants your data framed. I seem to remember some specific bit/byte patterns that are laid out in your user manual, so you will probably have to follow these exactly.

Double click on the viWriteAsync and look at the "Buffer" tab to see what data
was passed to the function (and therefore written out the port). This may help you in framing your data properly as you will have a known set of values you wrote from their software and then you can see exactly what the end result of bytes streamed to the device are.

Entries 9, 11, and 12 are involved in notifying the program when the write is done, so that's why they're not as important. This is what the asynchronous write is; the program will kick off the write, possibly do some other stuff, then get notified when the viWaitOnEvents returns that the write is done. You can more or less ignore these and focus on the viWriteAsync which will tell you exactly what is being written.

Hope this helps, let me know if any of this was unclear.

Scott B.
National Instruments
Applications Engineering
0 Kudos
Message 4 of 4
(3,186 Views)