EasyManua.ls Logo

Strasbaugh nTellect 7AF - Configuring and Writing to Analog Channels

Default Icon
2493 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Pamux User’s Guide 113
Normal under-range values are returned as a 16-bit twos-complement number (i.e., FFFF hex = -1, FFFE =
-2, FFFD = -3, etc.). Input channels that do not have modules installed will return -4096 (F000 hex). Input
modules that receive signals too far under range (below 1.25% of span) will stop relaying data to the
CPU. When this happens, the data returned will be -4096. This can occur when a 4–20 milliampere
signal goes below 3.8 milliamperes, or when a thermocouple input becomes an open circuit.
CONFIGURING AND WRITING TO ANALOG CHANNELS
The Pamux analog brain board configures all channels as inputs on power-up or after a reset. Thus, if
you are using output modules, they must be configured before they can be turned on.
To configure a channel as an output, you must set the module position’s bit to 1 in the configuration
register. The configuration register is found at location 7E and 7F Hex.
For example, if module positions 0, 1, and 3 are outputs, the configuration byte would be 0B, as
indicated below:
Position: 7 6 5 4 3 2 1 0
Bits: 0 0 0 0 1 0 1 1 = 0B Hex
With this information, you are ready to configure the channels. First you must gain access, as described
previously. Next, write the address of the configuration register to the control register. Finally, write the
configuration byte to the data register.
Once you have configured the channels, you are ready to write a value to an analog position. Writing is
the reverse of reading. The steps are as follows:
1. Write the position of the analog channel’s least significant byte to the control register.
2. Write the least significant byte to the data register.
3. Increment the control register.
4. Write the most significant byte to the data register.
The following example configures an analog output and, within a loop, continuously writes a changing
value to the output.
PROGRAMING WITHOUT THE PAMUX DRIVER

Table of Contents

Related product manuals