Fluke PM6681R, PM6685 Example, Clearing/Setting all bits, Using the Queues, Using the Status Byte

Models: PM6685 PM6685R PM6681 PM6681R

1 276
Download 276 pages 1.51 Kb
Page 84
Image 84
Clearing/Setting all bits

Using the Subsystems

Example:

The counter answers 40 when you ask for the contents of the Standard Event Status Register.

Convert this to binary form. It will give you 101000.

Bit 5 is true showing that a command error has occurred.

Bit 3 is also true, showing that a device de- pendent error has occurred.

Use the same technique when you pro- gram the enable registers.

Select which bits should be true.

Convert the binary expression to decimal data.

Send the decimal data to the instrument.

Clearing/Setting all bits

You can clear an enable register by pro- gramming it to zero. You can set all bits true in a 16-bit event enable register by programming it to 32767 (bit 16 not used).

You set all bits true in 8-bit registers by programming them to 255 (Service Re- quest Enable and Standard Event Enable.)

￿Using the Queues

The two queues, where CNT-8X stores output data and error messages, may con- tain data or be empty. Both these queues have their own status bit in the Status Byte. If this bit is true there is data to be fetched.

When the controller reads data, it will also remove the data from the queue. The queue status bit in the status byte will re- main true for as long as the queue holds

one or more data bytes. When the queue is empty, the queue status bit is set false.

Status of the Output Queue (MAV)

The MAV (message available) queue sta- tus message appears in bit 4 of the status byte register. It indicates if there are bytes ready to be read over the GPIB in the GPIB output queue of the instrument. The output queue is where the formatted data appears before it is transferred to the controller.

The controller reads this queue by ad- dressing the instrument as a talker. The command to do this differs between dif- ferent programming languages. Examples are IOENTERS and IBREAD.

Status of the Error Message Queue (EAV)

The EAV (error message available) queue status message appears in bit 2 of the status byte register. Use the :SYSTem:ERRor? query to read the er- ror messages. Chapter 21 explains all possible error messages .

￿Using the Status Byte

The status byte is an eight bit status mes- sage. It is sent to the controller as a re- sponse to a serial poll or a *STB? query, see Figure 6-7.Each bit in the status byte contains a summary message from the status structure. You can select what bits in the status byte should generate a ser- vice request to alert the controller.

When a service request occurs, the SRQ-line of the GPIB will be activated. Whether or not the controller will react on the service request depends on the controller program. The controller may be interrupted on occurrence of a service

6-16 Status Subsystem

Page 84
Image 84
Fluke PM6681R Example, Clearing/Setting all bits, Using the Queues, Status of the Output Queue MAV, Using the Status Byte