Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

GPIB - Determining type of message

Hi,

I've a little question.

I have a PC which is a GPIB controller and one device which is addressed by this controller.


If I send a message to the device, is it possible to know if the device has detected a query,
by checking control lines or another method ?

I need to know how to, send a message on gpib bus, without knowing if it's a command or query(so don't know if I have to use ibrd()) and
determine which type it is, when it has been sent by the controller and read by the device.


Thanks in advance for your help.
0 Kudos
Message 1 of 7
(4,070 Views)
Are you trying to just see the commands go to and from the Instrument?  If so you can use NI Spy to capture the GPIB commands.  I am still a little unsure of what you are attempting to do.  Usually you determine what commands you send down to the instrument so i am unsure why you wouldnt already know what commands you are sending?
LabVIEW 2012
0 Kudos
Message 2 of 7
(4,053 Views)
Hi,

I've got the following architecture :  PC <-----> Another PC <-----> Device

The first PC want to send a command or query to the device, but I modify the architecture to send them to a second PC.

This second PC, is doing something about the messages and then, it sends the messages to the device.

The problem is that today, the second PC don't know if it's a query or a command, so if data will be answered to the first Pc.

If so, it will have to read the answer and send it to the first PC.

I'm programming with NI 488.2 libraries from NI and I don't want to use NI-Spy in this case.


Message Edité par NI_Device_user_sb le 07-07-2008 08:52 AM
0 Kudos
Message 3 of 7
(4,045 Views)

Hi,

Usually the Cmd  that requires an answer has a question mark (?). But as you are sending this to an second PC, why not tell the PC what type it is by appending some thing to the string, (CMD or QUERY), which the second PC can strip off.

Regards

Ray Farmer

 

 

Regards
Ray Farmer
0 Kudos
Message 4 of 7
(4,030 Views)
Hi,

First of all, I've no access to the software which is running on the first PC. So I can't add information in messages.

Then, character '?' is part of IEEE 488.2 standard, but I can have messages which are query which are not terminated by a '?'.


What I need is a software or hardware solution, maybe provided by NI 488.2 functions in order to know if it's a query or not. I think it may have a solution based on control lines but I have a bad knowledge about IEEE 488.1 standard operations
0 Kudos
Message 5 of 7
(4,012 Views)

There is no difference in the control lines between a command or query. The handshaking is the same. The parsing of the command is done by the instrument. The instrument may or may not issue a service request but in many cases, it is the controller that just issues a read.

You say you are manilulating the commands in some fashion. Is there a reason you don't pass everything through? If there are some commands of the instrument you don't pass through and if it old and does not support the '?', you might have to add the instrument dictionary of commands to your intermediate pc.

0 Kudos
Message 6 of 7
(4,009 Views)
Hi,

basicly, that's what I'm doing. I've got a dictionnary on my second computer.

I've got 2 cases :

- For some messages, I have to traduce them
- For others, I have to transmit them directly without use of the dictionnary.


So, with all those answers, I think I'll have to use the dictionnary to transmit the same messages.


Message Edité par NI_Device_user_sb le 07-08-2008 01:49 AM
0 Kudos
Message 7 of 7
(3,978 Views)