Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Visa map address

Hallo,
 
I have a problem with Labview function "Visa Map Address".
I connected a serial cable from COM1 (from my PC) to a device under test. I would like to write 8 bits value to that device, and fortunately I found in Labview standard example a sample program " Low Level register access.vi",  It uses a function Visa Map Address, and this function always returns error. As far as I know, that function map the serial address (in this case COM1) to visa address. But why it always returns error ?
 
I made another simple program (attachment), it returns the same error. Any idea ?
Thanks a lot . Smiley Happy
0 Kudos
Message 1 of 5
(3,844 Views)

Why are you even attempting to do this? If you just want to write data to the serial port, all you need is the VISA Write.

I've used the low level register access functions to write to a pci card and I've used the out port function to write to the serial port but I don't know if you can use the low level stuff for the serial port and if your address space or offset is even correct. The help only mentions VXI flavors and PXI.

0 Kudos
Message 2 of 5
(3,837 Views)
Thank you for the reply, Dennis.
The reason I do that, because I want to use Visa Peek 8 and Visa Poke 8 function, and in help page I found "You must use the visa map address function to map the address before you can call this function."
Well, ok..actually I still don't know whether Visa Peek 8 and Visa Poke 8 can solve my problem or not , so I want to try it, but the visa map address function always returns error. I don't have any idea why ....   :mansad:
 
Thanks
0 Kudos
Message 3 of 5
(3,809 Views)
If you convert a byte array to a string and send that by VISA you will see that it is exactly doin what you want.
sending bytes to the serial port!

greetings from the Netherlands
0 Kudos
Message 4 of 5
(3,806 Views)

Albert is correct. Here's a picture that shows three different ways to specify the data to write as hex and output to the serial port. A fourth way would be to use the Outport function. The string constant is set for '\' Code Display (right click on a string control/constant).

Message Edited by Dennis Knutson on 01-10-2007 07:56 AM

0 Kudos
Message 5 of 5
(3,803 Views)