Theory of operation 7, Software – Sensoray 417 User Manual
Page 34

Chapter
7
Theory of Operation
7
Software
Execution of the embedded coprocessor firmware is managed by a multitasking kernel. The
kernel is responsible for scheduling and executing tasks, processing intertask communication
requests, and servicing real-time communication interrupts from the system bus interface. The
following paragraphs describe the inner-workings of tasks that are controlled by the kernel.
Scanner
This task performs the fundamental data acquisition function central to the coprocessor’s pur-
pose. By order of increasing channel numbers, this task repetitively scans all active channels.
The scanner begins a data conversion by selecting the next channel to be digitized. Analog
multiplexers are switched to select the target input channel, then the scanner sleeps while the
sensor signal stabilizes. When the front end has settled, the scanner awakens and initiates an
analog-to-digital conversion. Other processes are allowed to run during the conversion. Upon
completion of the conversion, the digitized data is passed to the post-processor.
Post-processor
The post-processor is responsible for refining uncorrected A/D data into finished form.
This task begins by receiving uncorrected channel data from the scanner. The data is corrected
for circuit offset and gain errors, then linearized and converted to engineering units appropriate
for the declared sensor type. The resulting value is passed through a programmable, sin-
gle-pole low-pass filter, then is stored in RAM for rapid host access.
Filtered data is checked for limit violations. If a violation is detected , both of the violated
channel’s limits are reset to their default values, the channel’s high or low alarm flag is asserted
and the status register Alarm bit is set.
Command Processor
The command processor fetches and executes commands from the host. Top priority is given to
this task in order to minimize communication latency between the host and coprocessor.
This task is awakened when a command is received from the host. The command processor
decodes the command opcode and invokes the appropriate command processing function. This
task manages command and data port communication handshake.