LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Visa - read single character

Hi,

I'm trying to interface a Jobin Yvon Horiba Triax 190 Monochromator with a PC using IEEE 488. The sample code that came with the device are in C and require the use of BIB.m and DECL.bas which, apparantly, I can find somewhere on the NI website.

However, since I'd rather write the code with the help of VISA on Visual Basic or Python (using the pvVISA module), I'm using the communication instructions in the manual to write the code myself. I've been trying to test the command sequences using the Interactive GPIB interface that came with my NI GPIB PCI card, but things arent working out too well. The instrument responds to the idn command the first time when its turned on, and after that refreshing the device list in MAX (the Explore GPIB software) causes it to recognize that the device exist but it did not respond to the indentification command.

Here is the problem : The device acknowledges my commands with a single character only. It does not assert EOI, and does not send an EOS for single character messages. How can I read single characters from VISA. All the documentaion about VISA I could find refer to the 3 ways VISA knows a message is terminated. None of those cases are satisfied by this device. Am I reading the manual wrong (in which case it would mean I have absolutely no idea why it isnt replying. Sending a command and waiting for the acknowledgement makes both cause timeout error - the write and the read).

Can anyone tell me if it is possible to read single characters using VISA.

Thanks in advance.
0 Kudos
Message 1 of 4
(3,459 Views)
Hello Shashank:

What is an example of a command that your device will respond to? Will it not accept any termination?
Regards,

Roland A.
Applications Engineer
National Instruments

Check out VI Roadshow
0 Kudos
Message 2 of 4
(3,433 Views)

Hi,

You can use the Visa Property Node to set the Termation Character Enable to False. The Visa Read has a count parameter. Set this to One and you will read 1 character.

regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 3 of 4
(3,424 Views)
Thanks very much for your replies. With your suggestion and some help from a non-compliance document from Anritsu, I realised that the default settings of VISA ignored the EOS. (I have a very old version of VISA. Things may have changed since, I donot know). Just configuring the Instrument and GPID bus settings in MAX apparantly isnt enough. I had to ask visa to lookfor the termination character and set the character to D (0x0d, or carriage return). By setting the correct attributes in the VISAic itself I am now bale to communicate. Now I am trying to figure out how to send a null character using VISAic.

Thanks again for the assistance.
0 Kudos
Message 4 of 4
(3,411 Views)