Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

GPIB Message Decoder

1. Looking at NAT9914 architecture, there is a message decoder block. What does it do? Does it check command syntax?
2. Regarding bit 4 and 5 of the Standard Event Status Register, which is Execution Error bit and Command Error bit, does it check the syntax error? My thinking is that SCPI will check the syntax error, not sure what those bits are checking.
3. I don't have the library function for the GPIB as I'm going to interface NAT9914 with 8051 controller. This will require a lot of addressing the registers; just want to know if I'm on the right path as GPIB is new to me.

Any advice, suggestion, guideline would be greatly appreciated.  Thank you.

Regards,
KH
0 Kudos
Message 1 of 4
(3,860 Views)

Hello GPIB.user,

 

The Message Decoders simply sets the bits in the interface registers and places the NAT9914 into the different modes as GPIB commands arrive.  Basically, the ASIC takes care of switching states for you and just alerts you when events happen (via the registers).

 

The Standard Event Status Register is in teh NAT9914 reference manual on page B-24.  Do you think that this documentation is incorrect?

 

The reference manual will allow you to communicate to your GPIB instruments thru the 9914.

 

Please let us know if you run into problems.

Steven T.

0 Kudos
Message 2 of 4
(3,835 Views)

Hello Steven,

Thanks for the prompt response. I'm still unclear about the Standard Event Status Register. Where is this register located at in NAT9914? I couldn't find it in the datasheet and I have the assumption that this register is user define on the microprocessor side. Please correct me if I'm wrong.

 

I read through the serial polling, and have some idea how it works. I need a big picture how it actually work. The SRQ line is share among all the other devices and will be asserted when a device need attention. What will happen when all the 14 devices need services at the same time? For primary addressing, does the controller doing the serial polling stating from address 0 til 30, or does it know which address to poll?

 

These are more questions about the GPIB, but these are the one that I'm trying to find the answer for now.

 

Thank you.

GPIB.user

0 Kudos
Message 3 of 4
(3,824 Views)

Hello,

 

Sorry for the delay.  You are completely correct about the Event Status Register.  This is a register that is implemented in software on the microprocessor.

 

NI-488.2 implements serial polling for controllers.  When the SRQ line changes state the behavior of the driver depends on if Auto-polling is enabled.

 

If Auto-polling is enabled, NI-488.2 serial polls all known instruments until the SRQ line toggles back.  It then checks all of the responses and changes the SRQ state of all device handles that were requesting service.  At this point, the user application can see that the instrument associated with a device handle is requesting service.  It can call ibrsp (serial poll) to get the byte that was received during the auto-poll. 

 

If Auto-polling is disabled, it is up to the user application to see that the SRQ line changed.  It must then use ibrsp with any device handles to get the status byte.  From the status byte, it can tell what the instrument needs.  Many drivers other than NI-488.2 do not have an autopoll feature.

 

For an instrument, the SRQ line as requesting service until the serial poll happens.

 

I hope this helps,

Steven T.

0 Kudos
Message 4 of 4
(3,783 Views)