Class Device
- Namespace
- Harp.SyringePump
- Assembly
- Harp.SyringePump.dll
Represents an observable source of messages from the Harp device connected at the specified serial port.
SyringePump | |
---|---|
whoAmI | 1296 |
firmwareVersion | 1.0 |
hardwareTargets | 1.0 |
Registers
name | address | type | length | access | description | range | interfaceType |
---|---|---|---|---|---|---|---|
EnableMotorDriver | 32 | U8 | Write | Enables the motor driver. | EnableFlag | ||
EnableProtocol | 33 | U8 | Write | Enables the currently defined protocol. | EnableFlag | ||
Step | 34 | U8 | Write, Event | Status of the STEP motor controller pin. | StepState | ||
Direction | 35 | U8 | Write, Event | Status of the DIR motor controller pin. | DirectionState | ||
ForwardSwitch | 36 | U8 | Event | Status of the forward limit switch. | ForwardSwitchState | ||
ReverseSwitch | 37 | U8 | Event | Status of the reverse limit switch. | ReverseSwitchState | ||
DigitalInputState | 38 | U8 | Event | Status of the digital input pin. | DigitalInputs | ||
DigitalOutputSet | 39 | U8 | Write | Set the specified digital output lines. | DigitalOutputs | ||
DigitalOutputClear | 40 | U8 | Write | Clear the specified digital output lines. | DigitalOutputs | ||
DO0Sync | 41 | U8 | Write | Configures which signal is mimicked in the digital output 0. | DO0SyncConfig | ||
DO1Sync | 42 | U8 | Write | Configures which signal is mimicked in the digital output 1. | DO1SyncConfig | ||
DI0Trigger | 43 | U8 | Write | Configures the callback function triggered when digital input is triggered. | DI0TriggerConfig | ||
StepMode | 44 | U8 | Write | Sets the motor step mode from a list of available types. | StepModeType | ||
ProtocolStepCount | 45 | U16 | Write | Sets the number of steps to be executed in the current protocol. | [1:] | ||
ProtocolPeriod | 47 | U16 | Write | Sets the period, in ms, of of each step in the protocol. | [1:] | ||
EnableEvents | 52 | U8 | Write | Specifies all the active events in the device. | PumpEvents | ||
Protocol | 54 | U8 | Event | Status of the protocol execution. | ProtocolState | ||
ProtocolDirection | 55 | U8 | Write | Sets the direction of the protocol execution. | ProtocolDirectionState |
[Combinator(MethodName = "Generate")]
[WorkflowElementCategory(ElementCategory.Source)]
public class Device : Device, INamedElement
- Inheritance
-
Device
- Implements
- Inherited Members
Constructors
Device()
Initializes a new instance of the Device class.
public Device()
Fields
WhoAmI
Represents the unique identity class of the Harp.SyringePump device. This field is constant.
public const int WhoAmI = 1296
Field Value
Properties
RegisterMap
Gets a read-only mapping from address to register type.
public static IReadOnlyDictionary<int, Type> RegisterMap { get; }
Property Value
Methods
CreateAsync(string)
Initializes a new instance of the asynchronous API to configure and interface with SyringePump devices on the specified serial port.
public static Task<AsyncDevice> CreateAsync(string portName)
Parameters
portName
stringThe name of the serial port used to communicate with the Harp device.
Returns
- Task<AsyncDevice>
A task that represents the asynchronous initialization operation. The value of the Result parameter contains a new instance of the AsyncDevice class.