110 likes | 289 Views
Organic Aerosol Thermal desorption chemical ionization mass Spectrometer David Thomson NOAA Aeronomy Lab October 19, 2006 ALARM Meeting. OATS - An Example of LCOD. Program Architecture Multiple Top-Level Tasks LCOD Components Timing Counters PXI Timing and Triggering
E N D
Organic Aerosol Thermal desorption chemical ionization mass Spectrometer David Thomson NOAA Aeronomy Lab October 19, 2006 ALARM Meeting OATS - An Example of LCOD
Program Architecture Multiple Top-Level Tasks LCOD Components Timing Counters PXI Timing and Triggering Pulse Generation Challenge OATS
Multiple Top-Level Tasks Control Task Starts other tasks, watches Alarms, shuts tasks down Housekeeping Records instrument health (1 Hz) State Sequencer Top level “mode” sequencer Data State Sequencer Carries out multiple data steps for each mode User Interface Optional - allows full user control Program Architecture
Queued State Machines Control Task State Machines with Enums State Sequencer Data State Sequencer Optional User Interface Two parallel Timed Loops Housekeeping One for Data Acquisition One for User Interface, Communication Task Architecture
Need access to various hardware devices from several top-level programs E.g., Control Task has to act on hardware, while Housekeeping Task queries it for data Need a semiphore mechanism to prevent communication collisions Developed “Drivers” or “Components” to address this issue Configuration info for all components stored in the same .ini file LCOD
Cross between a State Machine, a Functional Global, and an Object Encapsulates all methods required to deal with the Digital Output hardware Retains internal memory of the Digital Output states Allows Housekeeping to query the state without bothering the hardware Allows one bit in a byte to be set without changing the other bits Example Component: Digital Output
No-op Initialize Reads its section of the .ini file Retains its config info internally Sets up the required Daq tasks Can be called explicitely, or will be called automatically if a command is called Close Releases resourses when the program stops Commands: Set Bit State, Set Bit Hi, Set Bit Low, Negate Bit, Set Port, Read DO, Read Names Digital Output Component
Optional time-stamped logging of all actions Use/Simulate option Component Template for faster development Automatic logging of all errors to the Log File Component Caller VI allows access to all functions while the programs are running More Component Features
Sequences within Sequences... Dev1 32 Channel Slow AO (2 Counters) Dev2 M-Series for Housekeeping (1S/s, 2 Analog Outputs, 2 Counters) Dev3 M-Series for Data (1MS/s, 4 High Speed AO, 4 Counters) 4 Port RS232 Serial 3rd party Arb (20MS/s) Dev4 PXI-6602 Counter/Timer (8 Counters) OATS Timing and Triggering
Timing Diagram Empty Trap Mass Scan Generated On Triggered By Routed To Start Trap Begin Trap End Data Start Dev4 CTR4 Software PXI_Trig0 PXI_Trig0 PXI_Trig4 Dev1 CTR1 Trap End PXI_Trig0 then PXI_Trig4 Fast AO Clock pulse train reconfigured... single pulse Dev2 CTR1 PXI_Trig2 Dev3 AO 0-3 PXI_Trig2 Fast AOs Do Not Interupt PXI_Trig0 Dev3 CTR1 PXI_Trig1 PXI_Trig0 Dev3 CTR1 Acquire PXI_Trig2 then PXI_Trig1 reconfigured... Dev2 AO1 RF Amplitude Dev3 AI0 PXI_Trig1 Data Acquisition AC Waveform Trigger PXI_Trig0 PXI_Trig3 Dev4 CTR0 PXI_Trig3 Arb AC Waveform
Use AO to create a digital pulse train Reconfigure counters Other ideas? Pulse Generation Challenge