01-03-2008 04:23 PM
01-04-2008 06:11 PM
Hi Tom,
I am assuming that you have communication working using CWGPIB commands in Measurement Studio, as an addon to VB6, and that you are trying to implement the same functions using VISA commands.
If this is the case, I recommend taking a look at the NI-VISA help file. Under NI-VISA Help>>Function Reference, all the different GPIB commands for VISA are listed, with their corresponding VB syntax. I will look further into the underlying 488.2 functions being called under the CW commands to see if there are equivalent VISA commands for them.
Let me know if you have made any progress on this and if I am understanding the issue correctly.
Regards,
Lauren L.
01-07-2008 12:20 PM
Thanks Lauren,
Yes, the previous setups used the CWGPIB control and I'm trying to use the NI VISA dll to perform the same functions. I've got the basic "Read" and "Write" working, but I like to use the wait command to ensure I don't send a read command before the last command is fully processed. It's saved me on setting up multiple sleeps in the code. I've been referencing the help file and it's well written, but I couldn't tell what I needed to do for setup and then which commands I would use to get a read. An example is reading Trace Data from a spectrum analyzer in byte format. Performing reads with a byte array versus one big string was a function of the control. Reading trace data using the byte array was much faster than reading in as a string.
Thanks again,
Tom
01-08-2008 01:07 PM
Hi Tom,
Are you saying that you are unclear how to use a wait function with VISA commands? If I am understanding you correctly, the viWaitOnEvent function should serve this purpose. If you have questions about the syntax, let me know, but I believe that the help file has a fairly good description of the parameters.
Regards,
Lauren L
01-08-2008 01:25 PM
This is one of the items I need to resolve. I believe there is some preliminary setup required to use this. Also, I was not clear on if it only worked with asynchronous reads/writes or if it worked with standard read/writes as well. I think there was some register setting that needed to be performed, but couldn't discern what was needed. Thanks.
01-09-2008 06:08 PM
Hi Tom,
The default status of the WaitOnEvent function is to handle events asynchronously. In LabVIEW, the function can be modified to handle operations synchronously by changing the "Synchronous I/O Mode" to "Synchronous". As of yet, I am not sure what the corresponding command is (if there is one) in VB, although I am looking into it.
Regards,
Lauren L