Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of LGstaandart by
Diff: DevicePLCS.h
- Revision:
- 161:efd949e8d536
- Parent:
- 156:e68ee0bcdcda
- Child:
- 166:c3c0b8a90d81
--- a/DevicePLCS.h Fri May 13 14:04:22 2016 +0000
+++ b/DevicePLCS.h Sun May 15 19:12:12 2016 +0000
@@ -1,6 +1,7 @@
#ifndef __DEVICE_PLCS_H__
#define __DEVICE_PLCS_H__
+//Path length control amplifier (DAC - amplifier - control unit - drive) typedefs
typedef struct _DevicePathLengthControlAmplifierSettings {
uint32_t reference; //Reference voltage
uint32_t gain; //Amplifier gain
@@ -10,20 +11,81 @@
DevicePathLengthControlAmplifierSettings settings;
} DevicePathLengthControlAmplifier;
-typedef struct _DevicePathLengthControlSystemSettings {
-} DevicePathLengthControlSystemSettings;
+//Path length control reset typedefs
+typedef struct _DevicePathLengthControlResetDelaySettings {
+ uint32_t center; //reset delay in mks for normal conditions
+ uint32_t slope; //signed 16.16 format output voltage reset level correction per correction interval
+} DevicePathLengthControlResetDelaySettings;
+
+typedef struct _DevicePathLengthControlResetLevelSettings {
+ uint32_t center; //signed 16.16 format output voltage reset level
+ uint32_t slope; //signed 16.16 format output voltage reset level correction per correction interval
+} DevicePathLengthControlResetLevelSettings;
+
+typedef struct _DevicePathLengthControlResetConditionSettings {
+ DevicePathLengthControlResetDelaySettings delay;
+ DevicePathLengthControlResetLevelSettings level;
+} DevicePathLengthControlResetConditionSettings;
+
+typedef struct _DevicePathLengthControlResetSettings {
+ DevicePathLengthControlResetConditionSettings cooling;
+ DevicePathLengthControlResetConditionSettings heating;
+} DevicePathLengthControlResetSettings;
+
+typedef struct _DevicePathLengthControlResetState {
+ uint32_t delay; //reset delay in mks
+ uint32_t level; //signed 16.16 format output voltage reset level
+} DevicePathLengthControlResetState;
+
+typedef struct _DevicePathLengthControlReset {
+ DevicePathLengthControlResetSettings settings;
+ DevicePathLengthControlResetState state;
+} DevicePathLengthControlReset;
+
+//Path length control system modulator typedefs
+typedef struct _DevicePathLengthControlModulatorSettings {
+ uint8_t enabled;
+} DevicePathLengthControlModulatorSettings;
-typedef struct _DevicePathLengthControlSystemState {
- uint8_t loop;
- uint8_t modulation;
-} DevicePathLengthControlSystemState;
+typedef struct _DevicePathLengthControlModulatorState {
+ uint8_t enabled;
+} DevicePathLengthControlModulatorState;
+
+typedef struct _DevicePathLengthControlModulator {
+ DevicePathLengthControlModulatorSettings settings;
+ DevicePathLengthControlModulatorState state;
+} DevicePathLengthControlModulator;
+
+//Path length control system regulator typedefs
+typedef struct _DevicePathLengthControlRegulatorSettings {
+ uint8_t enabled;
+ uint32_t reference; //signed 16.16 format reference voltage
+ uint32_t scale; //signed 16.16 format regulator scale factor
+} DevicePathLengthControlRegulatorSettings;
+typedef struct _DevicePathLengthControlRegulatorState {
+ uint8_t enabled;
+ uint32_t reference; //signed 16.16 format reference voltage
+ uint32_t scale; //signed 16.16 format regulator scale factor
+ uint32_t error; //signed 16.16 format regulator error
+} DevicePathLengthControlRegulatorState;
+
+typedef struct _DevicePathLengthControlRegulator {
+ DevicePathLengthControlRegulatorSettings settings;
+ DevicePathLengthControlRegulatorState state;
+} DevicePathLengthControlRegulator;
+
+//Path length control system typedefs
+// Output signal ADC: device.controller.SSP.ADC[4]
+// Path length control system DAC: device.controller.SSP.DAC[1]
typedef struct _DevicePathLengthControlSystem {
- DevicePathLengthControlSystemSettings settings;
- DevicePathLengthControlSystemState state;
+ DevicePathLengthControlModulator modulator;
DevicePathLengthControlAmplifier amplifier;
+ DevicePathLengthControlReset reset;
+ DevicePathLengthControlRegulator regulator;
} DevicePathLengthControlSystem;
+//Path length control system functions
void InitPathLengthControlSystemWithDefaults(void);
void InitPathLengthControlSystem(void);
void StartPathLengthControlSystem(void);
