|
OptoMMP2
|
Object for communicating with Opto MMP Devices. More...
Classes | |
| struct | stPid |
| When reading or writing a PID, these are the available parameters returned or written. More... | |
| struct | structBrainDiagnosticInformation |
| Structure of information returned by ReadBrainDiagnosticInfo(). Added (April 4, 2011). More... | |
Public Member Functions | |
| OptoMMP () | |
| Constructor More... | |
| int | Open (string sHost, int i32Port, Connection eType, int i32InitialTimeoutMs, bool bPowerUpClear) |
| Opens An OptoMMP Object More... | |
| int | ChangeTimeout (int i32TimeoutMs) |
| Change the current timeout setting. More... | |
| int | GetCacheFreshness () |
| Retrieves the current data cache freshness setting. More... | |
| void | SetCacheFreshness (int i32FreshnessMs) |
| Sets the data cache freshness value. More... | |
| bool | IsOpen () |
| Test if there is a possibility of communicating to the remote device. More... | |
| void | Close () |
| Close the OptoMMP Object. More... | |
| int | GetLastRCodeFault () |
| When a -10 Error is reported, this method returns the last Opto MMP RCode. Check Form 1465 for proper response. More... | |
| int | WriteStatusCommand (StatusWriteCommand eCommand) |
| Writes a Status Command to Opto MMP Address 0xffff f038 0000 (see Opto 22 Form 1465, Section "Status Area Write - Read/Write") More... | |
| int | WriteFOrCStatus (bool bIsFahrenheit) |
| Force Brain to Report Temperature as Celsius or Fahrenheit More... | |
| int | ReadFOrCStatus (out bool bIsFahrenheit) |
| Read the Temperature Reporting Status of the Brain More... | |
| int | WriteWatchdogTime (int i32WatchdogTimeMs) |
| Set the Communication Watchdog Timeout of the IO unit. More... | |
| int | ReadWatchdogTime (out int i32WatchdogTimeMs) |
| Read the Device's Communication Watchdog Timeout More... | |
| int | ReadDateTime (out string sDateTime) |
| Read the Date and Time of the I/O Unit More... | |
| int | WriteDateTime (string sDateTime) |
| Write the Date-Time String to the IO Unit. More... | |
| int | WriteLocalDateTime () |
| Write Local Date-Time To The IO Unit. More... | |
| int | ReadScannerFlags (out int i32ScannerFlags) |
| Read the scanner flags of the control engine. More... | |
| int | WriteScannerFlags (int i32ScannerFlags) |
| Write the scanner flags to the OptoMMP device. More... | |
| int | ReadSerialModuleConfiguration (int i32PortNumber, out int i32TcpPort, out int i32BaudRate, out SerialParity eParity, out byte byDataBits, out byte byStopBits, out bool bHardwareFlowControl, out bool bTestMessage, out int i32Eom, out bool b4WireMode) |
| Read the Serial (Module) Port Configuration. Only for Module based Serial Ports. More... | |
| int | WriteSerialModuleConfiguration (int i32PortNumber, int i32TcpPort, int i32BaudRate, SerialParity eParity, byte byDataBits, byte byStopBits, bool bHardwareFlowControl, bool bTestMessage, int i32Eom, bool b4WireMode) |
| Write the Serial Port Configuration. Only for Module based Serial Ports. More... | |
| int | ReadSsiModuleConfiguration (int i32PortNumber, out int i32FrameSize, out Single f32ClockSpeedkHz, out Single f32InterFrameTimeUs, out int i32MsbOffset, out int i32DataBits, out int i32ErrorBitOffset, out bool bErrorBitLowIsError, out eDataCode eCoding, out bool bEnabled) |
| Read the SSI module configuration More... | |
| int | WriteSsiModuleConfiguration (int i32PortNumber, int i32FrameSize, float f32ClockSpeedkHz, float f32InterFrameTimeUs, int i32MsbOffset, int i32DataBits, int i32ErrorBitOffset, bool bErrorBitLowIsError, eDataCode eCoding, bool bEnabled) |
| Writes the SSI Module configuration More... | |
| int | WriteBrainStreamingConfiguration (int i32IntervalMs, int i32UdpPortDestination, string[] saryIpAddresses, long i64OptoMMPAddress, int i32LengthOfStream) |
| Configure the brain streaming functionality. More... | |
| int | EnableBrainStreaming (bool bEnableStreaming) |
| Controls the enable/disable functionality of brain streaming. More... | |
| int | ReadBrainStreamingConfiguration (out bool bIsEnabled, out int i32IntervalMs, out int i32UdpPortDestination, out string[] saryIpAddresses, out long i64OptoMMPAddress, out int i32LengthOfStream) |
| Read the Brain Streaming configuration. More... | |
| int | WriteStrategyStreaming (string sCommHandle, Single fInterval, int i32Objects, bool bStoreToFlash) |
| Write the "Strategy Streaming" Config. More... | |
| int | ReadStrategyStreaming (out string sCommHandle, out Single fInterval, out int i32Objects) |
| Read the "Strategy Streaming" More... | |
| int | ScratchpadBitsRead (out UInt64 u64ScratchpadBitmask) |
| Read scratchpad bits as a 64-bit bitmask. More... | |
| int | ScratchpadBitsRead (ref Boolean[] baryScratchpad, int i32StartIndex) |
| Read Scratchpad Bits Into A Boolean Array More... | |
| int | ScratchpadBitRead (out Boolean bState, Int32 i32Index) |
| Read Scratchpad Bit More... | |
| int | ScratchpadBitsWrite (UInt64 u64OnMask, UInt64 u64OffMask) |
| Writes all 64 scratchpad bit states using turn-on and turn-off bitmasks. More... | |
| int | ScratchpadBitsWrite (bool[] baryOnStates, bool[] baryOffStates, int i32StartIndex) |
| Writes All 64 Scratchpad Bitstates From "Must-On/Must-Off" (MoMo) Boolean Arrays More... | |
| int | ScratchpadBitWrite (Boolean bState, Int32 i32Index) |
| Write Scratchpad Bit More... | |
| int | ScratchPadF32NumberofElements () |
| Maximum number of elements in the Float Scratchpad Array. More... | |
| int | ScratchpadFloatRead (ref Single[] fary, int i32StartFaryIndex, int i32Length, int i32StartScratchpadStartIndex) |
| Read a block of 32-bit floating point (Single) scratchpad registers. More... | |
| int | ScratchpadFloatWrite (Single[] fary, int i32StartFaryIndex, int i32Length, int i32StartScratchpadStartIndex) |
| Write a block of float scratchpad registers. More... | |
| int | ScratchPadI32NumberofElements () |
| Maximum number of elements in the 32-bit Integer Scratchpad Array. More... | |
| int | ScratchpadI32Read (ref int[] i32ary, int i32StartIaryIndex, int i32Length, int i32StartScratchpadStartIndex) |
| Read a block of 32-bit signed-integer scratchpad registers. More... | |
| int | ScratchpadI32Write (int[] i32ary, int i32StartIaryIndex, int i32Length, int i32StartScratchpadStartIndex) |
| Write a block of 32-bit signed-integer scratchpad registers. More... | |
| int | ScratchPadI64NumberofElements () |
| Maximum number of elements in the 64-bit Integer Scratchpad Array. More... | |
| int | ScratchpadI64Read (ref long[] i64ary, int i32StartIaryIndex, int i32Length, int i32StartScratchpadStartIndex) |
| Read the 64-bit signed-integer (long) scratchpad registers More... | |
| int | ScratchpadI64Write (long[] i64ary, int i32StartIaryIndex, int i32Length, int i32StartScratchpadStartIndex) |
| Write a block of 64-bit signed integer scratchpad registers. More... | |
| int | ScratchPadStringNumberofElements () |
| Maximum number of elements in the String Scratchpad Array. More... | |
| int | ScratchpadStringRead (ref string[] strary, int i32StartStraryIndex, int i32Length, int i32StartScratchpadStartIndex) |
| Read the string scratchpad registers. More... | |
| int | ScratchpadStringWrite (string[] strary, int i32StartStraryIndex, int i32Length, int i32StartScratchpadStartIndex) |
| Write a block of string scratchpad registers. More... | |
| int | ReadDigitalStates64 (ref long i64DigitalStatesBitmask) |
| Read digital states as a 64-bit Bitmask. More... | |
| int | ReadDigitalStates64 (out UInt64 u64DigitalStatesBitmask) |
| Read digital states as a 64-bit Bitmask as a UInt64 More... | |
| int | ReadDigitalStates64 (ref Boolean[] baryDigitalStates64, int i32StartIndex) |
| Read 64 Digital States Into A Boolean Array More... | |
| int | ReadDigitalState64 (int i32PointNumber, ref bool bState) |
| Read the individual digital state by specifying the point number. More... | |
| int | ReadDigitalLatches64 (out long i64OnLatchBitMask, out long i64OffLatchBitMask) |
| Read all On and Off Latch States of the 64 Point I/O Unit Rack at Bitmasks. More... | |
| int | ReadDigitalLatches64 (out UInt64 u64OnLatchBitMask, out UInt64 u64OffLatchBitMask) |
| Read all On and Off Latch States of the 64 Point I/O Unit Rack with Unsigned Bitmasks. More... | |
| int | ReadDigitalLatches64 (ref Boolean[] baryOnLatches, ref Boolean[] baryOffLatches, Int32 i32StartIndex) |
| Read all On and Off Latch States of the 64 Point I/O Unit Rack with Boolean arrays. More... | |
| int | ReadDigitalLatch64 (int i32PointNumber, out bool bOnLatch, out bool bOffLatch) |
| Read the Digital Latches Selected by a Point Number. More... | |
| int | ReadClearDigitalLatches64 (bool bOnLatch, out long i64LatchBitmask) |
| Read and clear digital latches in the 64-point area. More... | |
| int | ReadClearDigitalLatches64 (bool bOnLatch, out UInt64 u64LatchBitmask) |
| Read and clear digital latches in the 64-point area, with a UInt64 latch bitmask. More... | |
| int | ReadClearDigitalLatches64 (bool bOnLatch, ref Boolean[] baryLatches, Int32 i32StartIndex) |
| Read and clear digital latches in the 64-point area, with a UInt64 latch bitmask. More... | |
| int | ReadClearDigitalLatch64 (int i32PointNumber, bool bOnLatch, out bool bLatchState) |
| Read and clear a digital latch. More... | |
| int | ReadOptionallyClearCounters64 (bool bClear, ref UInt32[] u32aryCounters, int i32StartIndex) |
| Read and optionally clear all 64 counters. More... | |
| int | ReadOptionallyClearCounter64 (int i32PointNumber, bool bClear, out UInt32 u32Counter) |
| Read and optionally clear a counter on the 64 point rack. More... | |
| int | WriteDigitalStates64 (long i64StateBitMask) |
| Sets all of the 4-channel digital states in the 64-point rack. More... | |
| int | WriteDigitalStates64 (ref bool[] baryStates, int i32StartIndex) |
| Write All 64 Digital States Using A Boolean Array. More... | |
| int | WriteDigitalStatesMoMo64 (long i64OnMask, long i64OffMask) |
| Writes All 64 Digital States From "Must-On/Must-Off" (MoMo) Bit Masks More... | |
| int | WriteDigitalStatesMoMo64 (bool[] baryOnStates, bool[] baryOffStates, int i32StartIndex) |
| Writes All 64 Digital States From "Must-On/Must-Off" (MoMo) Boolean Arrays More... | |
| int | WriteDigitalState64 (int i32PointNumber, bool bOn) |
| Set a single state of a 4-channel digital output, 64-point rack. More... | |
| int | WriteDigitalEnableorDisableCounters64 (long i64ActivateBitMask, long i64DeactivateBitMask) |
| Enable or disable a bank of counters in the 64-point rack. More... | |
| int | WriteDigitalEnableorDisableCounters64 (bool[] baryActivate, bool[] baryDeactivate, int i32StartIndex) |
| Enable or Disable All 64 Digital Counters From Boolean Arrays More... | |
| int | WriteDigitalEnableorDisableCounter64 (int i32PointNumber, bool bActivate) |
| Enable or disable a digital counter, 64-point rack. More... | |
| int | ReadDigitalCountersStatus64 (out long i64ActivateBitMask) |
| Reads All 64 Counter Status. More... | |
| int | ReadDigitalCountersStatus64 (ref bool[] baryActive, int i32StartIndex) |
| Read All 64 Counter Status To A Boolean Array. More... | |
| int | ReadDigitalCounterStatus64 (int i32PointNumber, out bool bCounterStatus) |
| Read a Counter Status in the 64 Point IO Unit Memory Map. More... | |
| int | ReadAnalogStates64 (ref Single[] fary, int i32StartingIndex) |
| Read all low-density (64-point) Analog Input and Output States. More... | |
| int | ReadAnalogState64 (int i32PointNumber, ref Single fAnalogValue) |
| Read an analog state via a point number. More... | |
| int | ReadOptionallyClearAnalogMaxMin64 (int i32PointNumber, bool bClear, out Single fMaximum, out Single fMinimum) |
| Read and clear analog maximum and minimum value of a point on a 64-point rack. More... | |
| int | WriteAnalogStates64 (Single[] faryValues, bool bEngineeringUnits, int i32StartIndex) |
| Set analog outputs in engineering units as a 64-point bank write. More... | |
| int | WriteAnalogState64 (int i32PointNumber, AnalogWriteOptions eOption, Single fWriteValue) |
| Sets a Single Analog State in the 64-Point IO Unit Memory Map. More... | |
| int | WriteDigitalPointConfiguration64 (int i32PointNumber, bool bOutput, eDigitalFeature eFeature, bool bEnableWatchdog, bool bWatchdogValue) |
| Write the digital point configuration. More... | |
| int | ReadDigitalPointConfiguration64 (int i32PointNumber, out int i32ModuleType, out int i32PointType, out int i32Feature, ref bool bWatchdogEnabled, ref bool bWatchdogValue) |
| Read the Digital Point Configuration More... | |
| int | WritePointConfiguration64 (int i32PointNumber, int i32PointType) |
| Write Analog Point configuration in 64 Point Area. More... | |
| int | WriteAnalogPointConfiguration64 (int i32PointNumber, int i32PointType, Single fHighScale, Single fLowScale, Single fOffset, Single fGain, Single fFilterWeight, bool bEnableWatchdog, Single fWatchdogValue) |
| Write Analog Point configuration in 64 Point Area. More... | |
| int | ReadAnalogPointConfiguration64 (int i32PointNumber, out int i32ModuleType, out int i32PointType, out Single fHighScale, out Single fLowScale, out Single fOffset, out Single fGain, out Single fFilterWeight, out bool bEnableWatchdog, out Single fWatchdogValue) |
| Read Analog Point Configuration in the 64-Point Area. More... | |
| int | WriteAnalogLoadCellConfiguration64 (int i32PointNumber, uint u32FastSettle, uint u32FilterWeight) |
| Write analog load cell configuration in 64 Point Area. More... | |
| int | ReadAnalogLoadCellConfiguration64 (int i32PointNumber, out uint u32FastSettle, out uint u32FilterWeight) |
| Read analog load cell configuration in the analog 64 point area (one point at a time). More... | |
| int | ReadHighDensityDigitalStates (ref bool[] baryStates, int i32StartIndex) |
| Read All 512 High-Density Digital States (32 points per module times 16 modules). More... | |
| int | ReadHighDensityDigitalStates (ref uint[] u32aryBitStates, int i32StartIndex) |
| Read All 512 High-Density Digital States To BitMask Array More... | |
| int | ReadHighDensityDigitalState (int i32PointNumber, out bool bState) |
| Read a high-density digital state. More... | |
| int | ReadOptionallyClearHighDensityDigitalLatches (bool bClear, ref bool[] baryOnLatches, ref bool[] baryOffLatches, int i32StartIndex) |
| Read and Optionally Clear All 512 High-Density Latches To Boolean Arrays (32 points per module times 16 modules) More... | |
| int | ReadOptionallyClearHighDensityDigitalLatches (bool bClear, ref uint[] u32aryOnLatches, ref uint[] u32aryOffLatches, int i32StartIndex) |
| Read and Optionally Clear All 512 High-Density Latches To BitMasks (32 points per module times 16 modules) More... | |
| int | ReadOptionallyClearHighDensityDigitalLatches (int i32StartModule, int i32EndModule, bool bClear, ref bool[] baryOnLatches, ref bool[] baryOffLatches, int i32StartIndex) |
| Read and Optionally Clear All 512 High-Density Latches To Boolean Arrays (32 points per module times 16 modules) More... | |
| int | ReadHighDensityDigitalLatch (int i32Module, int i32Channel, out bool bOnLatch, out bool bOffLatch) |
| Read a single high-density digital latch. More... | |
| int | ReadOptionallyClearHighDensityDigitalCounters32 (bool bClear, ref UInt32[] u32aryCounters, int i32StartIndex) |
| Read and Optionally clear High Density Digital Counters More... | |
| int | ReadHighDensityDigitalCounter (int i32Module, int i32Channel, out UInt32 u32Counter) |
| Read a High-Density Digital Counter More... | |
| int | WriteHighDensityDigitalStates (int i32StartModule, int i32EndModule, bool[] baryStates, int i32StartIndex) |
| Write High-Density Digital States, Module by Module Using A Boolean Array More... | |
| int | WriteHighDensityDigitalStates (int i32StartModule, int i32EndModule, int[] i32aryStates, int i32StartIndex) |
| Write High-Density Digital States, Module by Module Using A Bitmask Array More... | |
| int | ReadAnalogEus512 (ref Single[] f32aryValues, int i32StartIndex) |
| Read all Analog States as Engineering Units. More... | |
| int | ReadAnalogEu512 (int i32Point, ref Single f32Value) |
| Read a single Analog Engineering Unit Value. More... | |
| int | WriteAnalogEu512 (int i32Point, Single f32Value) |
| Write an analog output in the 512-Point IO Unit model. More... | |
| int | WriteAnalogPointConfiguration4096 (int i32PointNumber, int i32PointType, Single fHighScale, Single fLowScale, Single fOffset, Single fGain, Single fFilterWeight, bool bEnableWatchdog, Single fWatchdogValue) |
| Write Analog Point configuration in 4096 Point Area. More... | |
| int | ReadAnalogPointConfiguration4096 (int i32PointNumber, out int i32PointType, out Single fHighScale, out Single fLowScale, out Single fOffset, out Single fGain, out Single fFilterWeight, out bool bEnableWatchdog, out Single fWatchdogValue) |
| Read Analog Point configuration in 4096 Point Area. More... | |
| int | WriteAnalogPointConfiguration4096 (int i32PointNumber, int i32PointType) |
| Write Point configuration in 4096 Point Area. More... | |
| int | WriteAnalogLoadCellConfiguration4096 (int i32PointNumber, uint u32FastSettle, uint u32FilterWeight) |
| Write analog load cell configuration in 4,096 point area. More... | |
| int | ReadAnalogLoadCellConfiguration4096 (int i32PointNumber, out uint u32FastSettle, out uint u32FilterWeight) |
| Reads analog load cell configuration in 4,096 point area. More... | |
| int | ReadInts (long i64MmpAddress, int i32Length, ref int[] i32aryInts, int i32StartingIndex) |
| Read a block of integers (32-bit signed values) from the Memory Map More... | |
| int | WriteInts (long i64MmpAddress, int i32Length, int[] i32aryInts, int i32StartingIndex) |
| Write a block of 32-bit integers to a specific Opto MMP Address. More... | |
| int | ReadSingles (long i64MmpAddress, int i32Length, ref Single[] f32arySingles, int i32StartingIndex) |
| Read a block of Singles from the Opto MMP Device. More... | |
| int | WriteSingles (long i64MmpAddress, int i32Length, Single[] f32arySingles, int i32StartingIndex) |
| Write a block of Singles to the Opto MMP Device. More... | |
| int | ReadLongs (long i64MmpAddress, int i32Length, ref long[] i64aryLongs, int i32StartingIndex) |
| Read a block of longs (64-bit signed values) from the Opto MMP Device. More... | |
| int | WriteLongs (long i64MmpAddress, int i32Length, long[] i64aryLongs, int i32StartingIndex) |
| Write a block of longs (64-bit signed values) to the Opto MMP Device. More... | |
| void | GetExtendedErrorInformation (out string strMessage, out bool bCommFault, out bool bProtocolFault, out bool bArgumentFault) |
| Retrieves extended error information. This information is also logged in the computer's Application event log. More... | |
| int | ReadBrainDiagnosticInformation (out structBrainDiagnosticInformation info) |
| Read the diagnostic information of the brain. Added (April 4, 2011). More... | |
| Int32 | ReadPidQuantity (out Int32 i32PidQuantity) |
| Report supported PID quantity in the brain. More... | |
| Int32 | ReadPid (Int32 i32PidIndex, ref stPid PidData) |
| Read the entire PID. More... | |
| Int32 | WritePid (Int32 i32PidIndex, stPid PidData, ePidWriteOptions eWriteOption) |
| Write Pid (configure all or individual parameters [one at a time] of a PID) More... | |
| void | AboutPulses () |
| Information on generating discrete pulses. Method does not perform any operations. More... | |
| Int32 | ConfigureContinuousPulsesTime (Boolean bInvert, Single f32StartDelayTimeSeconds, Single f32OnTimeSeconds, Single f32OffTimeSeconds, IoModel eIoModelOfPointIndex, Int32 i32PointIndex64or512) |
| Configure a continuous discrete pulse train with on-time and off-time values. More... | |
| Int32 | ConfigureContinuousPulsesDuration (Boolean bInvert, Single f32StartDelayTimeSeconds, Single f32OnPercent, Single f32PeriodSeconds, IoModel eIoModelOfPointIndex, Int32 i32PointIndex64or512) |
| Configure a continuous discrete pulse train with percent-on and waveform period values. More... | |
| Int32 | ConfigureNPulsesTime (Boolean bInvert, Single f32StartDelayTimeSeconds, Single f32OnTimeSeconds, Single f32OffTimeSeconds, UInt32 u32PulseQuantity, IoModel eIoModelOfPointIndex, Int32 i32PointIndex64or512) |
| Configure an "N" pulse train using on-time and off-time parameters. More... | |
| Int32 | ConfigureNPulsesDuration (Boolean bInvert, Single f32StartDelayTimeSeconds, Single f32OnPercent, Single f32PeriodSeconds, UInt32 u32PulseQuantity, IoModel eIoModelOfPointIndex, Int32 i32PointIndex64or512) |
| Configure a continuous discrete pulse train using percent-on and wave period parameters. More... | |
| Int32 | StartPulse (IoModel eIoModelOfPointIndex, Int32 i32PointIndex64or512) |
| Start a pulse train. More... | |
| Int32 | StopPulse (IoModel eIoModelOfPointIndex, Int32 i32PointIndex64or512, Boolean bTurnOn) |
| Stop a pulse. Note, writing a discrete point state cancels an operating pulse. More... | |
| Int32 | WritePulsePercentage (IoModel eIoModelOfPointIndex, Int32 i32PointIndex64or512, Single f32Percent) |
| Write pulse percentage. Useful for continuous pulse trains... for example, time-proprotional outputs (e.g. heater applications). More... | |
| Int32 | ReadPulsePercentage (IoModel eIoModelOfPointIndex, Int32 i32PointIndex64or512, out Single f32Percent) |
| Read pulse percentage. More... | |
| Int32 | WritePulsePeriod (IoModel eIoModelOfPointIndex, Int32 i32PointIndex64or512, Single f32Period) |
| Write the pulse period. More... | |
| Int32 | ReadPulsePeriod (IoModel eIoModelOfPointIndex, Int32 i32PointIndex64or512, out Single f32Period) |
| Read the pulse period. More... | |
| Int32 | WritePulseOnOffTime (IoModel eIoModelOfPointIndex, Int32 i32PointIndex64or512, Single f32OnTime, Single f32OffTime) |
| Update a "time" configured pulse's on-time and off-time. Pulse must have been configured with either ConfigureContinuousPulsesTime() or ConfigureNPulsesTime() or unpredictable results will occur (even with a valid method result code). More... | |
| Int32 | ReadPulseOnOffTime (IoModel eIoModelOfPointIndex, Int32 i32PointIndex64or512, out Single f32OnTime, out Single f32OffTime) |
| Read a "time" configured pulse's on- and off-time values. The pulse must have been configured using ConfigureContinuousPulsesTime() or ConfigureNPulsesTime() or unpredictable results will be reported on f32OnTime and f32Offtime (even with a successful result of this method). More... | |
Static Public Member Functions | |
| static Single | ConvertTemperature (Single f32InputTemp, TemperatureScale eInScale, TemperatureScale eOutScale) |
| Converts temperatures. More... | |
| static int | GetPointNumberFor64 (int i32Module, int i32Channel) |
| Converts Module and Channel to Point Number For 64 Point IO Unit Model. More... | |
| static int | GetPointNumberFor512 (int i32Module, int i32Channel) |
| Converts Module and Channel to Point Number For 512 Point IO Unit Model. More... | |
| static int | GetPointNumberFor4096 (int i32Module, int i32Channel) |
| Converts Module and Channel to Point Number For 4096 Point IO Unit Model. More... | |
| static void | GetModuleAndChannelFromPoint64 (int i32Point, out int i32Module, out int i32Channel) |
| Converts A Point Number From The 64 Point Model To A Module And Channel Number. More... | |
| static void | GetModuleAndChannelFromPoint512 (int i32Point, out int i32Module, out int i32Channel) |
| Converts A Point Number From The 512 Point Model To A Module And Channel Number. More... | |
| static void | GetModuleAndChannelFromPoint4096 (int i32Point, out int i32Module, out int i32Channel) |
| Converts A Point Number From The 4096 Point Model To A Module And Channel Number. More... | |
| static int | GetSerialOrSsiPortIndexFromModuleAndChannel (int i32Module, int i32Channel) |
| Computes A Serial Port "Index" on the rack, for serial and SSI modules. More... | |
| static string | ConvertNumberToFirmwareVersion (int i32Number) |
| Converts an Opto 22 Version number (32-bit) to a version string like R8.5A. More... | |
| static void | Readme_WhenErrorsOccur () |
| Description of when errors occur. More... | |
| static void | Readme_AboutIOModules () |
| About SNAP IO Modules (added 02-23-2011) More... | |
Public Attributes | |
| const Int32 | i32cMaximumPulseObjects = 512 |
| SNAP-PAC-R1/2 and SNAP-PAC-EB1/2 have 512 pulse objects available. More... | |
Object for communicating with Opto MMP Devices.
This object communicates to Ethernet connected Opto MMP devices, primarily the SNAP-PAC Ethernet product line. This includes the SNAP-PAC-S, SNAP-PAC-R, and SNAP-PAC-EB series of brain and controllers. The Opto MMP Protocol is documented in Opto 22 form 1465, it is a publically available, royalty-free data protocol.
An object is responsible for communicating to a single Opto MMP device connection. More than one object (meaning more than one connection) may be made to an Opto MMP device. The object contains thread synchronization but ideally, sharing an object amongst different threads of execution does not work effectively and is discouraged. The object is intended to be opened and left open as long as possible until the application terminates or a communication fault occurs to the device. The object may be reused to communicate to the same object. Do not rapidly open and close a single object to communicate to multiple Opto MMP devices. Instead, always create an object for each device. This will alleviate connection issues and simplify the code implementation.
All methods are blocked methods. This means execution within the method pauses while the code waits for a response or timeout to occur. Higher throughput apps should use multiple threads and multiple objects to accelerate data access. But using too many concurrent communication objects will degrade the performance of the SNAP-PAC device. If many concurrent connections seem to be required, consider creating a scanner thread to communicate with the PAC and allow other threads to access thread shared data amongst the scanning thread.
The methods of this SDK block (suspend thread execution) while the physical I/O unit is messaged across the network. While usually, this is a very fast operation, high-latency networks or communication failures make consume a considerable amount of time. Due to this, it is not recommended to implement the SDK within the context of a Windows Message handler. Examples of this are mouse, forms, buttons, or other application events.
Opto 22 strongly recommends the use of UDP when a single network segment (no routers) is used. In cases where wireless, lossy networks, or high-latency WANs are implemented, use TCP with a minimum timeout of 1 second (1,000 milliseconds). This minimum timeout is enforced by the library when using TCP. While there is a minimum TCP timeout, we recommend a much longer timeout, at least 3 seconds for very lossy connections. Longer timeouts allows TCP/IP to perform background retranmissions increasing probability of communication success.
Data access efficiency is via reading the I/O unit in "banks" or those methods that allow you to read all or chunks of the I/O data all at once. One note, if caching is enabled (non-zero time), point reads are converted into bank operations. So you won't have to rewrite "point" oriented code. If you disable caching, you should perform bank reads to reduce network traffic and reduce I/O access latencies that will accumulate with each I/O read operation.
This library is built with the 3.5 .Net Framework. Windows 8 Pro users will have to install the .Net 3.5 Framework to use this SDK or applications referencing it.
This SDK supports Windows Vista Business 64-Bit, Windows 7 Professional (32- or 64-bit versions) and Windows 8 Pro (Intel).
You should use an Intel "Core 2" or AMD Athlon II/Phenom (or newer) microprocessor.
Please see Readme_WhenErrorsOccur() to handle unexpected issues. When a method ever returns a negative result, close the object. This library will log the fault in the Application Event viewer.
Please see Readme_AboutIOModules() to have a brief introduction to the types of SNAP IO modules. Knowing what modules you have will allow you to quickly know how to read and write to them.
IPv6 connectivity options offered when users are accessing one of our devices over a network through some kind of IPv6 to IPv4 router. In the near future, the allocation of IPv4 addresses will likely become more and more expensive pressing remote IO users to select IPv6 addresses (due to lower costs). This library provides this connection alternative.
Typically, the OptoMMP device allows up to 16 TCP/IP connections simultaneously. UDP is different in that a single socket is used due to the connectionless nature. This interface will buffer several dozen message before the incoming queue is filled. Subsequent messages beyond the queue depth are dropped. In most applications, we recommend using as little TCP sessions as possible or minimal filling of the UDP queue. This is to maintain a responsive system.
Release Notes have been moved to ReleaseNotes.txt.
Enumerations of the Analog Value Types That May Be Written.
TPO Options are only for the Analog TPO Module, SNAP-AOD-29.
Connection Types for Opto MMP
Probe data coding format enumerations.
Used to select how the module will detect the data format of the transducer. Note, Gray Code is more error tolerant. If you have a choice, use Gray Coding.
| Enumerator | |
|---|---|
| Binary |
The probe emits serial data that is binary encoded. |
| GrayCode |
Probe emits serial data in Gray code. |
| None |
No Assigned Code |
Digital features that may be configured in the 64-point memory map.
Algorithm Options
PID Write Options
Use enumeration ePidWriteOptions.InitializeAll to first time initialize the PID. Leave the algorithm in the Disabled setting or the PID instantly starts. You may also want to leave the PID in manual mode as well. Set the algorithm and the auto/manual mode thereafter.
| Enumerator | |
|---|---|
| InitializeAll |
Only use when completely initializing the PID. This is not a gracious initialization. You'll really want to leave the algorithm as default and use one of the other options to set it. |
| ProcessVariable |
Set the process variable (input). Only use when the process variable OptoMMP address is set to zero otherwise, unpredictable results will occur. Uses f32ProcessVariableOrInput. |
| Setpoint |
Set the setpoint. Only use when the setpoint OptoMMP address is set to zero otherwise, unpredictable results will occur. Uses f32Setpoint. |
| PCoefficient |
Set the proportional, K, or gain coefficient. Uses f32GainParameter. |
| ICoefficient |
Set the integral or I coefficient. Uses f32IntegralParameter. |
| DCoefficient |
Set the derivative or D coefficient. Uses f32DerivativeParameter. |
| FFGain |
Set the feed forward gain coefficient. Uses f32FeedForwardGainParameter. |
| OutputChangesAllowed |
Set the maximum and minimum output change limits. Uses f32MaximumOutputChange and f32MinimumOutputChange. |
| ProcessVariableClamps |
Set the limits on the process variable. Uses f32InputLowRange and f32InputHighRange. |
| OutputClamps |
Set the limit on the output. Uses f32OutputLowerClamp and f32OutputUpperClamp. |
| Scantime |
Set the PID scan time. Uses f32PidScanTimeSeconds. |
| OutputForceValuesWhenInputOutOfRange |
Set the output forcing values when the input goes out of range. Uses f32InputLowOutputForceValue and f32InputHighOutputForceValue. This value is usually only initialized once. |
| ProcessVariableOptoMmpAddress |
Set the process variable OptoMMP address. Use zero if your application provides the process variable. Uses u32InputSourceOptoMmpAddress. Use the lower 32-bits of the 48-bit OptoMMP address. |
| SetpointOptoMmpAddress |
Set the setpoint variable OptoMMP address. Use zero if your application provides the setpoint. Uses u32SetpointSourceOptoMmpAddress. Use the lower 32-bits of the 48-bit OptoMMP address. |
| OutputOptoMmpAddress |
Set the output OptoMMP address. Use zero if your application reads and processes the output. Uses u32OutputDestinationOptoMmpAddress. Use the lower 32-bits of the 48-bit OptoMMP address. |
| PidAlgorithm |
The algorithm of the PID. Only use this after initializing the PID. Do not change thereafter or unpredictable results will occur. Use eAlgorithm. Use enumeration "Disabled" to shut down the PID functionality. |
| PidAutoManualMode |
Set the PID in auto or manual mode. Uses structure property bInManualMode. When Ethernet I/O based PID's are in manual mode and the PID output is linked to an analog output module, you may only change the output value by modifying the PID's output. Writing to the actual analog output is futile as the next scan of the PID will clobber the recently written value. |
| ConfigurationFlags |
The configuration flags. Uses bSquareRootOfInput, bForceOutputWhenInputOutOfRange, and bSwitchToManualWhenInputOutOfRange. This operation forces all three flags at once. These are typically only written at initialization. They aren't intended to be constant enabled/disabled. |
| SupervisorPidInput |
Use only for Velocity C, when the PID input is supplied by a supervisory system and the firmware version is R8.5e or later. |
Command Values For the Status Area Write - Read/Write (see Opto 22 Form 1465).
| Enumerator | |
|---|---|
| PowerUpClear |
Send a Power-Up-Clear command to the I/O unit. Normally when using Open(), set bPowerUpClear to true. |
| ResetToDefaults |
Erases the I/O Unit FLASH configurations and reboots. TCP connections will be severed. Device may take up to 10 seconds to recover. |
| StoreToFlash |
Store the current I/O unit configuration to flash. This includes I/O configuration, serial settings, scratchpad values, etc. |
| EraseFlash |
Erases the I/O unit's FLASH image. This does not erase the currently in use RAM image. |
| ResetHardware |
Trigger the Opto MMP device to reboot (like power-cycling). |
| ClearDigitalEvents |
Clear digital events. |
| ClearAlarmsConfig |
Clear alarm configuration. |
| ClearPPPConfig |
Clear PPP configuration. |
| ClearEMailConfig |
Clear EMail Configuration. |
| ClearDigitalEventsExpanded |
Clear digital events. For firmware 8.0 and lower, clears timer configuration. |
| ClearPidLoops |
Clears PID loop configuration. |
| ClearDataLog |
Clears the data log configuration. |
Bits used to select particular object types.
| OptoMMP2.OptoMMP.OptoMMP | ( | ) |
Constructor
| void OptoMMP2.OptoMMP.AboutPulses | ( | ) |
Information on generating discrete pulses. Method does not perform any operations.
Caution, use pulses with only R9.0 or later firmware (SNAP-PAC-R or -EB devices only).
Pulses are intended for use on a discrete output point. This point may be either a 4-channel discrete output or with a "high-density" discrete output. High-Density is a discrete output module with more than 4 channels. Pulses are available in two formats, pulses defined by "on-time/off-time" or a percentage of on-time based on a time period.
For either type of pulse, there is a delay time in seconds that delays the actual pulse start.
For "time" based pulses, specify the "on-time" and the "off-time" in seconds. In this case, the resulting pulse time period is the sum of the on- and the off-times. This useful for generating pulsing claxons, alarms or indicators.
For "duration" based pulses, you will specify an initial "on-percentage" of the total pulse period. The remaining percentage of the period will be off.
A time-proportional output is a continuous duration based pulse. In this case, usually the on-percentage is modified to adjust how much of the pulse period is in the "on" state.
After a "configure" method is used, a pulse must be started using StartPulse(). A pulse may be stopped at any time using the StopPulse() method. In addition, forcing the discrete output on or off cancels a pulse operation.
When configuring a pulse for a 4-channel discrete module, ensure the point index is calculated using the GetPointIndexFor64() and set the point model type enumeration properly. For high-density discrete modules, use GetPointIndexFor512 and set the IoModel enumeration.
There are limits for 4-channel discrete output modules. SNAP-PAC-R1 has a minimum period of 0.006 seconds and an accuracy of 0.001 seconds. SNAP-PAC-R2 has a minimum period of 0.100 seconds and an accuracy of 0.001 seconds. SNAP-PAC-EB1 has a minimum period of 0.040 seconds and an accuracy of 0.005 seconds. SNAP-PAC-EB2 has a minimum period of 0.100 seconds and an accuracy of 0.005 seconds.
For high-density discrete outputs (modules with more than 4 discrete outputs), the minimum period is 1.00 seconds and a worse case accuracy of 1 second.
| int OptoMMP2.OptoMMP.ChangeTimeout | ( | int | i32TimeoutMs | ) |
Change the current timeout setting.
The minimum UDP/IP timeout is 100 milliseconds.
The minimum TCP/IP timeout is 1000 milliseconds. This typically one TCP/IP retransmission before a timeout is indicated.
Timeout values less than the minimum are forced to the minimum values mentioned.
| i32TimeoutMs | New timeout value in milliseconds. |
| void OptoMMP2.OptoMMP.Close | ( | ) |
Close the OptoMMP Object.
| Int32 OptoMMP2.OptoMMP.ConfigureContinuousPulsesDuration | ( | Boolean | bInvert, |
| Single | f32StartDelayTimeSeconds, | ||
| Single | f32OnPercent, | ||
| Single | f32PeriodSeconds, | ||
| IoModel | eIoModelOfPointIndex, | ||
| Int32 | i32PointIndex64or512 | ||
| ) |
Configure a continuous discrete pulse train with percent-on and waveform period values.
| f32StartDelayTimeSeconds | Delay start time in seconds. |
| bInvert | True inverts logic levels, for example the on portion of the pulse is now off and vice versa. |
| f32OnPercent | On percent, values 0.0 to 100.0. |
| f32PeriodSeconds | Waveform period in seconds. |
| eIoModelOfPointIndex | Specifies the which model (64- or 512-point) the point index represents. |
| i32PointIndex64or512 | Discrete point index to pulse too. Provide 64 point index for 4-channel discrete modules, 512- for high-density. |
| Int32 OptoMMP2.OptoMMP.ConfigureContinuousPulsesTime | ( | Boolean | bInvert, |
| Single | f32StartDelayTimeSeconds, | ||
| Single | f32OnTimeSeconds, | ||
| Single | f32OffTimeSeconds, | ||
| IoModel | eIoModelOfPointIndex, | ||
| Int32 | i32PointIndex64or512 | ||
| ) |
Configure a continuous discrete pulse train with on-time and off-time values.
| bInvert | True inverts logic levels, for example the on portion of the pulse is now off and vice versa. |
| f32StartDelayTimeSeconds | Delay start time in seconds. |
| f32OnTimeSeconds | On time in seconds. |
| f32OffTimeSeconds | Off time in seconds. |
| eIoModelOfPointIndex | Specifies the which model (64- or 512-point) the point index represents. |
| i32PointIndex64or512 | Discrete point index to pulse too. Provide 64 point index for 4-channel discrete modules, 512- for high-density. |
| Int32 OptoMMP2.OptoMMP.ConfigureNPulsesDuration | ( | Boolean | bInvert, |
| Single | f32StartDelayTimeSeconds, | ||
| Single | f32OnPercent, | ||
| Single | f32PeriodSeconds, | ||
| UInt32 | u32PulseQuantity, | ||
| IoModel | eIoModelOfPointIndex, | ||
| Int32 | i32PointIndex64or512 | ||
| ) |
Configure a continuous discrete pulse train using percent-on and wave period parameters.
| f32StartDelayTimeSeconds | Delay start time in seconds. |
| bInvert | True inverts logic levels, for example the on portion of the pulse is now off. |
| f32OnPercent | On percent, values 0.0 to 100.0. |
| f32PeriodSeconds | Total waveform period in seconds. |
| u32PulseQuantity | Number of pulses to generate. |
| eIoModelOfPointIndex | Specifies the which model (64- or 512-point) the point index represents. |
| i32PointIndex64or512 | Discrete point index to pulse too. |
| Int32 OptoMMP2.OptoMMP.ConfigureNPulsesTime | ( | Boolean | bInvert, |
| Single | f32StartDelayTimeSeconds, | ||
| Single | f32OnTimeSeconds, | ||
| Single | f32OffTimeSeconds, | ||
| UInt32 | u32PulseQuantity, | ||
| IoModel | eIoModelOfPointIndex, | ||
| Int32 | i32PointIndex64or512 | ||
| ) |
Configure an "N" pulse train using on-time and off-time parameters.
| bInvert | True inverts logic levels, for example the on portion of the pulse is now off. |
| f32StartDelayTimeSeconds | Delay start time in seconds. |
| f32OnTimeSeconds | On time in seconds. |
| f32OffTimeSeconds | Off time in seconds. |
| u32PulseQuantity | Number of pulses to generate. |
| eIoModelOfPointIndex | Specifies the which model (64- or 512-point) the point index represents. |
| i32PointIndex64or512 | Discrete point index to pulse too. Provide 64 point index for 4-channel discrete modules, 512- for high-density. |
|
static |
Converts an Opto 22 Version number (32-bit) to a version string like R8.5A.
This works with either the loader or firmware version numbers
| i32Number | The Opto 22 version number read from an OptoMMP Device. |
|
static |
Converts temperatures.
The brain is slow to change temperature scales. Depending on the application, temperatues may need to be changed depending on the specific system needs; in some cases, the same system may need to display more than one temperature scale. This method provides a faster and more efficient way of converting temperatures.
| f32InputTemp | Input temperature value. |
| eInScale | Scale type the input temperature represents. |
| eOutScale | Output temperature scale requested. |
| int OptoMMP2.OptoMMP.EnableBrainStreaming | ( | bool | bEnableStreaming | ) |
Controls the enable/disable functionality of brain streaming.
This method didn't properly update the stream enabled flag. Corrected on 3-24-2011.
| bEnableStreaming | true to enable stream. |
| int OptoMMP2.OptoMMP.GetCacheFreshness | ( | ) |
Retrieves the current data cache freshness setting.
Additional notes on the cache implementation in SetCacheFreshness().
| void OptoMMP2.OptoMMP.GetExtendedErrorInformation | ( | out string | strMessage, |
| out bool | bCommFault, | ||
| out bool | bProtocolFault, | ||
| out bool | bArgumentFault | ||
| ) |
Retrieves extended error information. This information is also logged in the computer's Application event log.
| strMessage | String to store the message generated by the method. |
| bCommFault | True indicates a communication oriented fault. Close and reopen the object. |
| bProtocolFault | True indicates an Opto MMP oriented fault. More than likely, you're using UDP, and the I/O unit power cycled. Perform a WriteStatusCommand() and issue a "PowerUpClear". TCP connections will break when the I/O unit is reset so this code would not be returned. |
| bArgumentFault | True indicates a fault was generated by an improper argument. Inspect the argument values passed, a parameter is not correct. |
| int OptoMMP2.OptoMMP.GetLastRCodeFault | ( | ) |
When a -10 Error is reported, this method returns the last Opto MMP RCode. Check Form 1465 for proper response.
|
static |
Converts A Point Number From The 4096 Point Model To A Module And Channel Number.
| i32Point | 4096 model point number. |
| i32Module | The module number. |
| i32Channel | The point number. |
|
static |
Converts A Point Number From The 512 Point Model To A Module And Channel Number.
| i32Point | 512 model point number. |
| i32Module | The module number. |
| i32Channel | The point number. |
|
static |
Converts A Point Number From The 64 Point Model To A Module And Channel Number.
| i32Point | 64 model point number. |
| i32Module | The module number. |
| i32Channel | The point number. |
|
static |
Converts Module and Channel to Point Number For 4096 Point IO Unit Model.
| i32Module | Module number, values range from 0 to 63, no error checking provided. |
| i32Channel | Channel on the module, values range from 0 to 63, no error checking provided. |
|
static |
Converts Module and Channel to Point Number For 512 Point IO Unit Model.
| i32Module | Module number, values range from 0 to 15, no error checking provided. |
| i32Channel | Channel on the module, values range from 0 to 31, no error checking provided. |
|
static |
Converts Module and Channel to Point Number For 64 Point IO Unit Model.
| i32Module | Module number, values range from 0 to 15, no error checking provided. |
| i32Channel | Channel on the module, values range from 0 to 3, no error checking provided. |
|
static |
Computes A Serial Port "Index" on the rack, for serial and SSI modules.
| i32Module | Module location on the rack, 0 to 15. |
| i32Channel | Channel on the module, 0 (Channel A) or 1 (Channel B). |
| bool OptoMMP2.OptoMMP.IsOpen | ( | ) |
Test if there is a possibility of communicating to the remote device.
For TCP sockets, this test to see if the computer "believes" the socket is writeable. It does not guarantee that the actual socket is actually "writeable." A true test of communication is to read a section of the memory-map to see if a valid networking path is available to the destination host.
For UDP sockets, if the Open() has been called, true is always returned. The only way to validate a UDP socket's ability to communicate is to read a section of the memory-map to see if a networking path is available.
| int OptoMMP2.OptoMMP.Open | ( | string | sHost, |
| int | i32Port, | ||
| Connection | eType, | ||
| int | i32InitialTimeoutMs, | ||
| bool | bPowerUpClear | ||
| ) |
Opens An OptoMMP Object
The UDP/IP option is strongly recommended for single-segment networks.
Use TCP/IP when communicating over wireless and wide-area-network connections. For Wide-Area-Networks, larger timeouts may be needed.
If using TCP/IP, an internal reconnection backoff algorithm throttles how agressive reconnections will occur at.
| sHost | Hostname (DNS or "hosts") or IP Address in dot format. |
| i32Port | The UDP or TCP port, typically, 2001. |
| eType | Connection Type, use UDP for most systems, TCP when internet connectivity is involved. |
| bPowerUpClear | Set this to "true." True clears the "Powered Up" flag on the brain. |
| i32InitialTimeoutMs | Initial timeout (ms) for messaging transactions. 1000 ms is typical. |
| int OptoMMP2.OptoMMP.ReadAnalogEu512 | ( | int | i32Point, |
| ref Single | f32Value | ||
| ) |
Read a single Analog Engineering Unit Value.
May return a cached value.
| i32Point | Point number, range is 0 to 511. |
| f32Value | Parameter to store the point value. |
| int OptoMMP2.OptoMMP.ReadAnalogEus512 | ( | ref Single[] | f32aryValues, |
| int | i32StartIndex | ||
| ) |
Read all Analog States as Engineering Units.
This method may return cached values.
| f32aryValues | Array to store values retrieved from the IO unit. This array must be 512 elements larger than i32StartIndex in length. |
| i32StartIndex | Starting index in the data array to store read values. |
| int OptoMMP2.OptoMMP.ReadAnalogLoadCellConfiguration4096 | ( | int | i32PointNumber, |
| out uint | u32FastSettle, | ||
| out uint | u32FilterWeight | ||
| ) |
Reads analog load cell configuration in 4,096 point area.
This just returns a single load-cell module's fast-settle and filter weight parameters.
While this is a configuration function, the data lies within the analog point write area (kind of unusual).
| i32PointNumber | Point Number, 0 to 511. |
| u32FastSettle | Load cell input fast settle value. See form 1465 for values. |
| u32FilterWeight | Filter weight value. See form 1465 for values. |
| int OptoMMP2.OptoMMP.ReadAnalogLoadCellConfiguration64 | ( | int | i32PointNumber, |
| out uint | u32FastSettle, | ||
| out uint | u32FilterWeight | ||
| ) |
Read analog load cell configuration in the analog 64 point area (one point at a time).
Reads the analog load cell's parameters (fast-settle and filter weight).
While this is a configuration function, the data lies within the analog point write area (kind of unusual).
| i32PointNumber | The 64-point rack's number, from 0 to 63. |
| u32FastSettle | The fast settle parameter, see form 1465 for values. |
| u32FilterWeight | The filter weight setting, see form 1465 for values. |
| int OptoMMP2.OptoMMP.ReadAnalogPointConfiguration4096 | ( | int | i32PointNumber, |
| out int | i32PointType, | ||
| out Single | fHighScale, | ||
| out Single | fLowScale, | ||
| out Single | fOffset, | ||
| out Single | fGain, | ||
| out Single | fFilterWeight, | ||
| out bool | bEnableWatchdog, | ||
| out Single | fWatchdogValue | ||
| ) |
Read Analog Point configuration in 4096 Point Area.
This area must be configured before points may be read in the 512-point area.
Useful for setting all configuration values of an analog point (input or output).
| i32PointNumber | Point Number, 0 to 511. |
| i32PointType | The point type. |
| fHighScale | Upper Scale Value (when input is 100%). |
| fLowScale | Lower Scale Value (when input is either 0% [unipolar] or -100% [bipolar]). |
| fOffset | Offset. |
| fGain | Gain. |
| fFilterWeight | Filter Weight (0.0 disables or positive values). |
| bEnableWatchdog | Enable analog communication watchdog. |
| fWatchdogValue | The value to force whhen communication watchdog occurs. |
| int OptoMMP2.OptoMMP.ReadAnalogPointConfiguration64 | ( | int | i32PointNumber, |
| out int | i32ModuleType, | ||
| out int | i32PointType, | ||
| out Single | fHighScale, | ||
| out Single | fLowScale, | ||
| out Single | fOffset, | ||
| out Single | fGain, | ||
| out Single | fFilterWeight, | ||
| out bool | bEnableWatchdog, | ||
| out Single | fWatchdogValue | ||
| ) |
Read Analog Point Configuration in the 64-Point Area.
This method may return a cached value.
| i32PointNumber | Analog Point Number, 0 to 63. |
| i32ModuleType | Module type. |
| i32PointType | Point type. |
| fHighScale | 100% high-scale value. |
| fLowScale | 0% (unipolar) or -100% (bipolar) low-scale value. |
| fOffset | Calibration offset. |
| fGain | Calibration gain. |
| fFilterWeight | Filter weight. |
| bEnableWatchdog | Watchdog enabled. |
| fWatchdogValue | Watchdog value. |
| int OptoMMP2.OptoMMP.ReadAnalogState64 | ( | int | i32PointNumber, |
| ref Single | fAnalogValue | ||
| ) |
Read an analog state via a point number.
If Freshness is set to a non zero value, this method may returned a cached value.
| i32PointNumber | Point number requested, range 0 to 63. |
| fAnalogValue | Current value of the analog input or output. |
| int OptoMMP2.OptoMMP.ReadAnalogStates64 | ( | ref Single[] | fary, |
| int | i32StartingIndex | ||
| ) |
Read all low-density (64-point) Analog Input and Output States.
May return cached values.
In assembly version 1.1.2.0, a fix was made that if fary wasn't exactly 64, a -1 would be returned.
| fary | Single array to store the requested data. Must be preinitialized. |
| i32StartingIndex | Starting index to store this data. |
| int OptoMMP2.OptoMMP.ReadBrainDiagnosticInformation | ( | out structBrainDiagnosticInformation | info | ) |
Read the diagnostic information of the brain. Added (April 4, 2011).
| info | Parameter package read from the brain. |
| int OptoMMP2.OptoMMP.ReadBrainStreamingConfiguration | ( | out bool | bIsEnabled, |
| out int | i32IntervalMs, | ||
| out int | i32UdpPortDestination, | ||
| out string[] | saryIpAddresses, | ||
| out long | i64OptoMMPAddress, | ||
| out int | i32LengthOfStream | ||
| ) |
Read the Brain Streaming configuration.
| bIsEnabled | When true, stream is enabled. |
| i32IntervalMs | Interval of stream in milliseconds, 0 is as fast as possible. |
| i32UdpPortDestination | Port to stream to, this is the PC or client's destination port. |
| saryIpAddresses | IP addresses configured in "dot" format. |
| i64OptoMMPAddress | MMP address if not default stream. Note if set to zero, this will read as 0xffff00000000. |
| i32LengthOfStream | Length of the MMP stream (if not default). |
| int OptoMMP2.OptoMMP.ReadClearDigitalLatch64 | ( | int | i32PointNumber, |
| bool | bOnLatch, | ||
| out bool | bLatchState | ||
| ) |
Read and clear a digital latch.
This method does not return cached values.
This method only works with the 64-point I/O unit properties.
| i32PointNumber | Point number to read (0 through 63). |
| bOnLatch | True, method reads and clears "on" latch. When False, reads and clears "off" latch. |
| bLatchState | The state of the selected latch. |
| int OptoMMP2.OptoMMP.ReadClearDigitalLatches64 | ( | bool | bOnLatch, |
| out long | i64LatchBitmask | ||
| ) |
Read and clear digital latches in the 64-point area.
This method does not return cached values.
This method only works with the 64-point I/O unit properties.
| bOnLatch | True, method reads and clears "on" latch. When False, reads and clears "off" latch. |
| i64LatchBitmask | A long to store the latch state. Bit 0 is channel 0. |
| int OptoMMP2.OptoMMP.ReadClearDigitalLatches64 | ( | bool | bOnLatch, |
| out UInt64 | u64LatchBitmask | ||
| ) |
Read and clear digital latches in the 64-point area, with a UInt64 latch bitmask.
This method does not return cached values.
This method only works with the 64-point I/O unit properties.
| bOnLatch | True, method reads and clears "on" latch. When False, reads and clears "off" latch. |
| u64LatchBitmask | A UInt64 to store the latch state. Bit 0 is channel 0. |
| int OptoMMP2.OptoMMP.ReadClearDigitalLatches64 | ( | bool | bOnLatch, |
| ref Boolean[] | baryLatches, | ||
| Int32 | i32StartIndex | ||
| ) |
Read and clear digital latches in the 64-point area, with a UInt64 latch bitmask.
This method does not return cached values.
This method only works with the 64-point I/O unit properties.
| bOnLatch | True, method reads and clears "on" latch. When False, reads and clears "off" latch. |
| baryLatches | A boolean array to store the latch states. Bit 0 is channel 0. |
| i32StartIndex | Start index of baryLatches to write latch states too. |
| int OptoMMP2.OptoMMP.ReadDateTime | ( | out string | sDateTime | ) |
Read the Date and Time of the I/O Unit
| sDateTime | Date Time String from the I/O Unit |
| int OptoMMP2.OptoMMP.ReadDigitalCountersStatus64 | ( | out long | i64ActivateBitMask | ) |
Reads All 64 Counter Status.
This may returned cached values.
| i64ActivateBitMask | Status of the counters as a 64-bit mask. |
| int OptoMMP2.OptoMMP.ReadDigitalCountersStatus64 | ( | ref bool[] | baryActive, |
| int | i32StartIndex | ||
| ) |
Read All 64 Counter Status To A Boolean Array.
| baryActive | States of the counters, true is active counter. Array must be at least i32StartIndex + 64 in length. |
| i32StartIndex | Starting index to store values. |
| int OptoMMP2.OptoMMP.ReadDigitalCounterStatus64 | ( | int | i32PointNumber, |
| out bool | bCounterStatus | ||
| ) |
Read a Counter Status in the 64 Point IO Unit Memory Map.
This may returned cached values.
| i32PointNumber | Point number to read, values 0 through 63. |
| bCounterStatus | The counter's status as a boolean. |
| int OptoMMP2.OptoMMP.ReadDigitalLatch64 | ( | int | i32PointNumber, |
| out bool | bOnLatch, | ||
| out bool | bOffLatch | ||
| ) |
Read the Digital Latches Selected by a Point Number.
May return cached values.
This method only works with the 64-point I/O unit properties.
| i32PointNumber | Point number, range 0 to 63. 0 is point 0. |
| bOnLatch | On latch state. |
| bOffLatch | Off latch state. |
| int OptoMMP2.OptoMMP.ReadDigitalLatches64 | ( | out long | i64OnLatchBitMask, |
| out long | i64OffLatchBitMask | ||
| ) |
Read all On and Off Latch States of the 64 Point I/O Unit Rack at Bitmasks.
May return cached values.
Does not return the latch state of high-density digital modules.
This method only works with the 64-point I/O unit properties.
| i64OnLatchBitMask | Bit packed mask of on-latches. Bit-0 coorelates to point 0. |
| i64OffLatchBitMask | Bit packed mask of off-latches. Bit-0 coorelates to point 0. |
| int OptoMMP2.OptoMMP.ReadDigitalLatches64 | ( | out UInt64 | u64OnLatchBitMask, |
| out UInt64 | u64OffLatchBitMask | ||
| ) |
Read all On and Off Latch States of the 64 Point I/O Unit Rack with Unsigned Bitmasks.
May return cached values.
Does not return the latch state of high-density digital modules.
This method only works with the 64-point I/O unit properties.
| u64OnLatchBitMask | Bit packed mask of on-latches. Bit-0 coorelates to point 0. |
| u64OffLatchBitMask | Bit packed mask of off-latches. Bit-0 coorelates to point 0. |
| int OptoMMP2.OptoMMP.ReadDigitalLatches64 | ( | ref Boolean[] | baryOnLatches, |
| ref Boolean[] | baryOffLatches, | ||
| Int32 | i32StartIndex | ||
| ) |
Read all On and Off Latch States of the 64 Point I/O Unit Rack with Boolean arrays.
May return cached values.
Does not return the latch state of high-density digital modules.
This method only works with the 64-point I/O unit properties.
| baryOnLatches | 64 element Boolean array of on-latches. Index 0 coorelates to point 0 when i32StartIndex == 0. |
| baryOffLatches | 64 element Boolean array of off-latches. Index 0 coorelates to point 0 when i32StartIndex == 0. |
| i32StartIndex | Start index of the on-latch an off-latch arrays to store data. |
| int OptoMMP2.OptoMMP.ReadDigitalPointConfiguration64 | ( | int | i32PointNumber, |
| out int | i32ModuleType, | ||
| out int | i32PointType, | ||
| out int | i32Feature, | ||
| ref bool | bWatchdogEnabled, | ||
| ref bool | bWatchdogValue | ||
| ) |
Read the Digital Point Configuration
| i32PointNumber | Point number, 0 to 63. |
| i32ModuleType | Module installed in this location. See form 1465 for additional information. |
| i32PointType | Point configured in this location. |
| i32Feature | Feature enabled (if any). |
| bWatchdogEnabled | Watchdog enabled state. |
| bWatchdogValue | Watchdog trigger state. |
| int OptoMMP2.OptoMMP.ReadDigitalState64 | ( | int | i32PointNumber, |
| ref bool | bState | ||
| ) |
Read the individual digital state by specifying the point number.
May returned a cached value depending on the data freshness.
This method only works with the 64-point I/O unit properties.
| i32PointNumber | Point number, valid values range from 0 to 63. |
| bState | The state of the digital point, true is "on." |
| int OptoMMP2.OptoMMP.ReadDigitalStates64 | ( | ref long | i64DigitalStatesBitmask | ) |
Read digital states as a 64-bit Bitmask.
Bit 0 coorelates to the first module, first channel of the rack.
Will report digital states, even when analog or serial modules are present.
May returned a cached value depending on the data freshness.
This method only works with the 64-point I/O unit properties.
This member only reads the states of 4-channel digital modules.
| i64DigitalStatesBitmask | Reference to a long, to store the 64 digital states read. |
| int OptoMMP2.OptoMMP.ReadDigitalStates64 | ( | out UInt64 | u64DigitalStatesBitmask | ) |
Read digital states as a 64-bit Bitmask as a UInt64
Bit 0 coorelates to the first module, first channel of the rack.
Will report digital states, even when analog or serial modules are present.
May returned a cached value depending on the data freshness.
This method only works with the 64-point I/O unit properties.
This member only reads the states of 4-channel digital modules.
| u64DigitalStatesBitmask | Reference to a long, to store the 64 digital states read. |
| int OptoMMP2.OptoMMP.ReadDigitalStates64 | ( | ref Boolean[] | baryDigitalStates64, |
| int | i32StartIndex | ||
| ) |
Read 64 Digital States Into A Boolean Array
| baryDigitalStates64 | Array of booleans to store values. Length must be i32StartIndex + 64. |
| i32StartIndex | Starting index to store values. |
| int OptoMMP2.OptoMMP.ReadFOrCStatus | ( | out bool | bIsFahrenheit | ) |
Read the Temperature Reporting Status of the Brain
| bIsFahrenheit | An out value of true is Fahrenheit, false is Celsius |
| int OptoMMP2.OptoMMP.ReadHighDensityDigitalCounter | ( | int | i32Module, |
| int | i32Channel, | ||
| out UInt32 | u32Counter | ||
| ) |
Read a High-Density Digital Counter
This method may return a cached value.
| i32Module | The module number to read, 0 through 15. |
| i32Channel | The channel number to read 0 through 31. |
| u32Counter | The counter value. |
| int OptoMMP2.OptoMMP.ReadHighDensityDigitalLatch | ( | int | i32Module, |
| int | i32Channel, | ||
| out bool | bOnLatch, | ||
| out bool | bOffLatch | ||
| ) |
Read a single high-density digital latch.
method may return a cached value.
| i32Module | Module number, 0 to 15. |
| i32Channel | Channel number, 0 to 31. |
| bOnLatch | On-latch state. |
| bOffLatch | Off-latch state. |
| int OptoMMP2.OptoMMP.ReadHighDensityDigitalState | ( | int | i32PointNumber, |
| out bool | bState | ||
| ) |
Read a high-density digital state.
This method may return a cached value.
| i32PointNumber | High-Density Point number (0 through 511) to store the data in your boolean table. |
| bState | State of the digital point. |
| int OptoMMP2.OptoMMP.ReadHighDensityDigitalStates | ( | ref bool[] | baryStates, |
| int | i32StartIndex | ||
| ) |
Read All 512 High-Density Digital States (32 points per module times 16 modules).
This method may return a cached values.
Ignore digital data returned for; channels that do not exist, empty module slots, or module slots with analog or serial I/O modules.
| i32StartIndex | Starting index to store the data in your boolean table. |
| baryStates | Boolean array. May be "null" if not information is desired. |
| int OptoMMP2.OptoMMP.ReadHighDensityDigitalStates | ( | ref uint[] | u32aryBitStates, |
| int | i32StartIndex | ||
| ) |
Read All 512 High-Density Digital States To BitMask Array
| u32aryBitStates | Array to store states, one element per module. Array must be at least i32StartIndex + 16 in length. |
| i32StartIndex | Starting index to store values. |
| int OptoMMP2.OptoMMP.ReadInts | ( | long | i64MmpAddress, |
| int | i32Length, | ||
| ref int[] | i32aryInts, | ||
| int | i32StartingIndex | ||
| ) |
Read a block of integers (32-bit signed values) from the Memory Map
There are many areas this toolkit does not support with a direct method. Use this method to access these areas.
The maximum number of elements that may be transferred is 256.
This method does not return cached values.
| i64MmpAddress | Starting Opto MMP Address. |
| i32Length | Number of 32-bit integer values to read. |
| i32aryInts | Array of 32-bit integers. |
| i32StartingIndex | Starting index of the 32-bit integer array to store values. |
| int OptoMMP2.OptoMMP.ReadLongs | ( | long | i64MmpAddress, |
| int | i32Length, | ||
| ref long[] | i64aryLongs, | ||
| int | i32StartingIndex | ||
| ) |
Read a block of longs (64-bit signed values) from the Opto MMP Device.
There are many areas this toolkit does not support with a direct method. Use this method to access these areas.
The maximum number of elements that may be transferred is 128.
Does not return cached values.
| i64MmpAddress | Opto MMP Address. |
| i32Length | Quantity of longs to read. |
| i64aryLongs | Array of longs to read. |
| i32StartingIndex | Starting index of i64aryLongs to read too. |
|
static |
About SNAP IO Modules (added 02-23-2011)
These are the types of SNAP IO Modules.
4-Channel Digital Input or Output
To access the data of these IO modules use the digital methods that end with a "64." To determine the mapping index [a number from 0 to 63] use the static helper GetPointNumberFor64().
(Up to) 4-Channel Analog Input or Outputs
To access the data of these IO modules, use analog methods that end with a "64." To determine the mapping index [a number from 0 to 63] use the static helper GetPointNumberFor64().
More than 4-Channel Digital Input or Output
To access the data of these IO modules, use digital methods like ReadHighDensityDigitalState(), ReadHighDensityDigitalStates(), WriteHighDensityDigitalState() or other member that include the "HighDensity" wording.
More than 4-Channel Analog Input or Output
To access input values from these modules, use ReadAnalogEu512(), ReadAnalogEus512() and other 512 point configurations. Use the helper GetPointNumberFor512() to determine the point's index you wish to retrieve.
Serial Communication Modules are different modules. These require configuration (baud, stop bits, EOM characters etc) using this toolkit. See WriteSerialModuleConfiguration(). This is specifically for SCM-232 or SCM-485/422 IO modules. The communication stream is handled by a TCP session. You may use the ip4.Tcp_Client to connect to a serial module. The TCP ports for serial modules range from 22500 through 22531. The port number is determined by using this method GetSerialOrSsiPortIndexFromModuleAndChannel() and add 22500. One connection is allow to a serial module at a time. New connection requests to a serial port already being used will automatically close the currently open session.
|
static |
Description of when errors occur.
This assembly logs events to the computer's application event log. When a fault occurs (and the application didn't handle the condition), review the application event log. This file may be e-mailed to Opto 22's support so we may review the conditions of the fault as well.
When a negative response occurs from any object, close the OptoMMP object. Attempts at continuing to use the object may be disastrous, especially when TCP/IP is used.
This method doesn't do anything, but to serve as a place to appear in the html documentation.
| int OptoMMP2.OptoMMP.ReadOptionallyClearAnalogMaxMin64 | ( | int | i32PointNumber, |
| bool | bClear, | ||
| out Single | fMaximum, | ||
| out Single | fMinimum | ||
| ) |
Read and clear analog maximum and minimum value of a point on a 64-point rack.
| i32PointNumber | Point number (0 through 63) |
| bClear | When true, resets the value after being read. |
| fMaximum | Maximum value read. |
| fMinimum | Minimum value read. |
| int OptoMMP2.OptoMMP.ReadOptionallyClearCounter64 | ( | int | i32PointNumber, |
| bool | bClear, | ||
| out UInt32 | u32Counter | ||
| ) |
Read and optionally clear a counter on the 64 point rack.
This method does not cache data.
This method only works with the 64-point I/O unit properties.
Reading and clearing counters may cause counts to be lost.
| i32PointNumber | Point number in the 64-point IO unit model. |
| bClear | When true, clears the counter. |
| u32Counter | Storage for counter value. |
| int OptoMMP2.OptoMMP.ReadOptionallyClearCounters64 | ( | bool | bClear, |
| ref UInt32[] | u32aryCounters, | ||
| int | i32StartIndex | ||
| ) |
Read and optionally clear all 64 counters.
This method does not return cached values.
This method only works with the 64-point I/O unit properties.
Reading and clearing counters may cause counts to be lost.
| bClear | When true, clears the counters. |
| u32aryCounters | Storage for counter values. |
| i32StartIndex | Starting index in u32aryCounters to store data. |
| int OptoMMP2.OptoMMP.ReadOptionallyClearHighDensityDigitalCounters32 | ( | bool | bClear, |
| ref UInt32[] | u32aryCounters, | ||
| int | i32StartIndex | ||
| ) |
Read and Optionally clear High Density Digital Counters
When bClear is false, may return a cached value.
When bClear is true, all high-density counters are cleared with this method.
| i32StartIndex | Start index of the point to read counters. |
| bClear | When true, counters are cleared after reading. |
| u32aryCounters | Unsigned array to store the value of the counters. |
| int OptoMMP2.OptoMMP.ReadOptionallyClearHighDensityDigitalLatches | ( | bool | bClear, |
| ref bool[] | baryOnLatches, | ||
| ref bool[] | baryOffLatches, | ||
| int | i32StartIndex | ||
| ) |
Read and Optionally Clear All 512 High-Density Latches To Boolean Arrays (32 points per module times 16 modules)
| i32StartIndex | Start index to read and optionally clear. |
| bClear | When true, clears the latch after being read. |
| baryOnLatches | Array to store on-latch states. |
| baryOffLatches | Array to store off-latch states. |
| int OptoMMP2.OptoMMP.ReadOptionallyClearHighDensityDigitalLatches | ( | bool | bClear, |
| ref uint[] | u32aryOnLatches, | ||
| ref uint[] | u32aryOffLatches, | ||
| int | i32StartIndex | ||
| ) |
Read and Optionally Clear All 512 High-Density Latches To BitMasks (32 points per module times 16 modules)
Method may return cached values if bClear is false.
| i32StartIndex | Start index to read and optionally clear. |
| bClear | When true, clears the latch after being read. |
| u32aryOnLatches | Array to store on-latch bitstates. |
| u32aryOffLatches | Array to store off-latch bitstates. |
| int OptoMMP2.OptoMMP.ReadOptionallyClearHighDensityDigitalLatches | ( | int | i32StartModule, |
| int | i32EndModule, | ||
| bool | bClear, | ||
| ref bool[] | baryOnLatches, | ||
| ref bool[] | baryOffLatches, | ||
| int | i32StartIndex | ||
| ) |
Read and Optionally Clear All 512 High-Density Latches To Boolean Arrays (32 points per module times 16 modules)
Method may return cached values if bClear is false.
| i32StartModule | First High-Density module to read. |
| i32EndModule | Last High-Density module to read. |
| bClear | When true, clears the latch after being read. |
| baryOnLatches | Array to store on-latch bitstates. |
| baryOffLatches | Array to store off-latch bitstates. |
| i32StartIndex | Start index to read and optionally clear. |
| Int32 OptoMMP2.OptoMMP.ReadPid | ( | Int32 | i32PidIndex, |
| ref stPid | PidData | ||
| ) |
Read the entire PID.
Under the hood, PIDs are read in blocks of 8 PIDs. Both configuration and data areas are read.
This method does not support the SNAP-PID-V module (a legacy product).
May return a cached value.
| i32PidIndex | Index of the PID to read. A zero to "one less" number returned by ReadPidQuantity(). Only negative indicies return a fault code. |
| PidData | The parsed data reported by the brain. |
| Int32 OptoMMP2.OptoMMP.ReadPidQuantity | ( | out Int32 | i32PidQuantity | ) |
Report supported PID quantity in the brain.
This value is a constant for each brain/controller and firmware version. This value may only be read on SNAP-PAC-R or SNAP-PAC-EB series brains (not supported in SNAP-PAC-S controllers).
May return a cached value.
| i32PidQuantity | The quantity of PIDs the brain supports. Only valid when the result code is zero. |
| Int32 OptoMMP2.OptoMMP.ReadPulseOnOffTime | ( | IoModel | eIoModelOfPointIndex, |
| Int32 | i32PointIndex64or512, | ||
| out Single | f32OnTime, | ||
| out Single | f32OffTime | ||
| ) |
Read a "time" configured pulse's on- and off-time values. The pulse must have been configured using ConfigureContinuousPulsesTime() or ConfigureNPulsesTime() or unpredictable results will be reported on f32OnTime and f32Offtime (even with a successful result of this method).
| eIoModelOfPointIndex | Specifies the which model (64- or 512-point) the point index represents. |
| i32PointIndex64or512 | Discrete output index. |
| f32OnTime | Pulse on-time in seconds. |
| f32OffTime | Pulse off-time in seconds. |
| Int32 OptoMMP2.OptoMMP.ReadPulsePercentage | ( | IoModel | eIoModelOfPointIndex, |
| Int32 | i32PointIndex64or512, | ||
| out Single | f32Percent | ||
| ) |
Read pulse percentage.
The specified TPO must have been set using ConfigureContinuousPulsesDuration() or ConfigureNPulsesDuration() or the value returned in f32Percent is unpredictable (even when a successful result is returned by the method).
| eIoModelOfPointIndex | Specifies the which model (64- or 512-point) the point index represents. |
| i32PointIndex64or512 | Index for the 64 or 512 point model index for the specific discrete output used. |
| f32Percent | Current percentage set for the pulse object. |
| Int32 OptoMMP2.OptoMMP.ReadPulsePeriod | ( | IoModel | eIoModelOfPointIndex, |
| Int32 | i32PointIndex64or512, | ||
| out Single | f32Period | ||
| ) |
Read the pulse period.
The specified TPO must have been set using ConfigureContinuousPulsesDuration() or ConfigureNPulsesDuration() or the result of this operation is unpredictable.
| eIoModelOfPointIndex | Specifies the which model (64- or 512-point) the point index represents. |
| i32PointIndex64or512 | Index for the 64 or 512 point model index for the specific discrete output used. |
| f32Period | Pulse period in seconds. |
| int OptoMMP2.OptoMMP.ReadScannerFlags | ( | out int | i32ScannerFlags | ) |
Read the scanner flags of the control engine.
Added April 30, 2010.
| i32ScannerFlags | Out parameter when the return value is okay. Bit compressed value of the scanner flags. |
| int OptoMMP2.OptoMMP.ReadSerialModuleConfiguration | ( | int | i32PortNumber, |
| out int | i32TcpPort, | ||
| out int | i32BaudRate, | ||
| out SerialParity | eParity, | ||
| out byte | byDataBits, | ||
| out byte | byStopBits, | ||
| out bool | bHardwareFlowControl, | ||
| out bool | bTestMessage, | ||
| out int | i32Eom, | ||
| out bool | b4WireMode | ||
| ) |
Read the Serial (Module) Port Configuration. Only for Module based Serial Ports.
| i32PortNumber | Serial port number to read, values 0 through 31. See GetSerialOrSsiPortIndexFromModuleAndChannel(). |
| i32TcpPort | TCP/IP Service port this serial port is associated too. |
| i32BaudRate | Baud rate of the serial port. |
| eParity | Parity enumeration the port. |
| byDataBits | Number of Data Bits. |
| byStopBits | Number of Stop Bits. |
| bHardwareFlowControl | Hardware Flow Control. |
| bTestMessage | Powerup Test Message. |
| i32Eom | 32-bit Value of End-Of-Message. |
| b4WireMode | Two or Four-Wire Mode (for 485/422 serial modules). |
| int OptoMMP2.OptoMMP.ReadSingles | ( | long | i64MmpAddress, |
| int | i32Length, | ||
| ref Single[] | f32arySingles, | ||
| int | i32StartingIndex | ||
| ) |
Read a block of Singles from the Opto MMP Device.
There are many areas this toolkit does not support with a direct method. Use this method to access these areas.
The maximum number of elements that may be transferred is 256.
This method will not return cached values.
| i64MmpAddress | Opto MMP Address. |
| i32Length | Quantity of Singles to read. |
| f32arySingles | Array of singles to read. |
| i32StartingIndex | Starting index of f32arySingles to read too. |
| int OptoMMP2.OptoMMP.ReadSsiModuleConfiguration | ( | int | i32PortNumber, |
| out int | i32FrameSize, | ||
| out Single | f32ClockSpeedkHz, | ||
| out Single | f32InterFrameTimeUs, | ||
| out int | i32MsbOffset, | ||
| out int | i32DataBits, | ||
| out int | i32ErrorBitOffset, | ||
| out bool | bErrorBitLowIsError, | ||
| out eDataCode | eCoding, | ||
| out bool | bEnabled | ||
| ) |
Read the SSI module configuration
This function requires SNAP-PAC firmware R8.5C or later.
| i32PortNumber | The SSI module port number, values range from 0 to 31. See GetSerialOrSsiPortIndexFromModuleAndChannel(). |
| i32FrameSize | Length of the entire data frame in bits. |
| f32ClockSpeedkHz | Frequency of the transducer (in kHz). |
| f32InterFrameTimeUs | Time between data frames (in microseconds). |
| i32MsbOffset | Location of the data MSB in the data frame. Starts from zero. |
| i32DataBits | Location of the data bit in the frame. Starts from clock zero. |
| i32ErrorBitOffset | Location of the error bit in the frame. Starts from clock zero. |
| bErrorBitLowIsError | Active status of the error bit. |
| eCoding | Encoding of the transducer. |
| bEnabled | Enables the brain to scan the SNAP-SCM-SSI module. |
| int OptoMMP2.OptoMMP.ReadStrategyStreaming | ( | out string | sCommHandle, |
| out Single | fInterval, | ||
| out int | i32Objects | ||
| ) |
Read the "Strategy Streaming"
Only used on SNAP-PAC-R controllers running the "streaming strategy" for additional I/O streaming capabilities.
| sCommHandle | The configured comm handle. |
| fInterval | Interval of streaming. |
| i32Objects | Objects selected within the strategy. |
| int OptoMMP2.OptoMMP.ReadWatchdogTime | ( | out int | i32WatchdogTimeMs | ) |
Read the Device's Communication Watchdog Timeout
| i32WatchdogTimeMs | [out] The timeout currently set at the IO unit. 0 is disabled. |
| int OptoMMP2.OptoMMP.ScratchpadBitRead | ( | out Boolean | bState, |
| Int32 | i32Index | ||
| ) |
Read Scratchpad Bit
May return a cached value.
| bState | When true the bit is on. False, the bit is off. |
| i32Index | Bit index, values 0 to 63. |
| int OptoMMP2.OptoMMP.ScratchpadBitsRead | ( | out UInt64 | u64ScratchpadBitmask | ) |
Read scratchpad bits as a 64-bit bitmask.
Bit 0 coorelates to bit 0 in the scratchpad bits.
May returned a cached value depending on the data freshness value.
| u64ScratchpadBitmask | Reference to a long, to store the 64 scratchpad bits. |
| int OptoMMP2.OptoMMP.ScratchpadBitsRead | ( | ref Boolean[] | baryScratchpad, |
| int | i32StartIndex | ||
| ) |
Read Scratchpad Bits Into A Boolean Array
May return a cached value.
| baryScratchpad | Array of booleans to store values. Length must be at least i32StartIndex + 64. |
| i32StartIndex | Starting index to store values. |
| int OptoMMP2.OptoMMP.ScratchpadBitsWrite | ( | UInt64 | u64OnMask, |
| UInt64 | u64OffMask | ||
| ) |
Writes all 64 scratchpad bit states using turn-on and turn-off bitmasks.
| u64OnMask | The states to be forced on. Bit value of 1 turns on, 0 leaves state unaffected. |
| u64OffMask | The states to be forced off. Bit value of 1 turns off, 0 leaves state unaffected. |
| int OptoMMP2.OptoMMP.ScratchpadBitsWrite | ( | bool[] | baryOnStates, |
| bool[] | baryOffStates, | ||
| int | i32StartIndex | ||
| ) |
Writes All 64 Scratchpad Bitstates From "Must-On/Must-Off" (MoMo) Boolean Arrays
| baryOnStates | The states to be forced on. True turns on, false leaves state unaffected. |
| baryOffStates | The states to be forced off. True turns off, false leaves state unaffected. |
| i32StartIndex | Starting index to read states from. |
| int OptoMMP2.OptoMMP.ScratchpadBitWrite | ( | Boolean | bState, |
| Int32 | i32Index | ||
| ) |
Write Scratchpad Bit
| bState | Boolean. |
| i32Index | Bit index, values 0 to 63. |
| int OptoMMP2.OptoMMP.ScratchPadF32NumberofElements | ( | ) |
Maximum number of elements in the Float Scratchpad Array.
| int OptoMMP2.OptoMMP.ScratchpadFloatRead | ( | ref Single[] | fary, |
| int | i32StartFaryIndex, | ||
| int | i32Length, | ||
| int | i32StartScratchpadStartIndex | ||
| ) |
Read a block of 32-bit floating point (Single) scratchpad registers.
Reads large blocks of scratchpads by breaking up large requests into multiple 256-element requests.
Only access the contents of fary when this method is completed.
If reading back a write that was recently performed, disable freshness by setting the time to zero before reading back the scratchpad.
In .Net an Opto 22 "float" is a "Single" precision data type.
SNAP-UP1-xxx family of controllers only support indices 0-1023.
May returned a cached value depending on the data freshness.
| fary | Float array to store the returned data. |
| i32StartFaryIndex | Starting index of the float array to store the data. |
| i32Length | Number of continuous floats to read. |
| i32StartScratchpadStartIndex | Starting index of the float scratchpads to read from. |
| int OptoMMP2.OptoMMP.ScratchpadFloatWrite | ( | Single[] | fary, |
| int | i32StartFaryIndex, | ||
| int | i32Length, | ||
| int | i32StartScratchpadStartIndex | ||
| ) |
Write a block of float scratchpad registers.
In .Net an Opto 22 "32-bit float" is a "Single" precision data type.
Not cachable.
SNAP-UP1-xxx family of controllers only support indices 0-1023.
| fary | Array of float values to write. |
| i32StartFaryIndex | Start index of the float aray. |
| i32Length | Number of float elements to write. |
| i32StartScratchpadStartIndex | Starting float scratchpad element to write too. |
| int OptoMMP2.OptoMMP.ScratchPadI32NumberofElements | ( | ) |
Maximum number of elements in the 32-bit Integer Scratchpad Array.
| int OptoMMP2.OptoMMP.ScratchpadI32Read | ( | ref int[] | i32ary, |
| int | i32StartIaryIndex, | ||
| int | i32Length, | ||
| int | i32StartScratchpadStartIndex | ||
| ) |
Read a block of 32-bit signed-integer scratchpad registers.
Reads large blocks of scratchpads by breaking up large requests into multiple 256-element requests.
Only access the contents of i32ary when this method is completed.
If reading back a write that was recently performed, disable freshness by setting the time to zero before reading back the scratchpad.
SNAP-UP1-xxx family of controllers only support indices 0-1023.
May returned a cached value depending on the data freshness.
| i32ary | 32-bit integer array to store the returned data. |
| i32StartIaryIndex | Starting index of the float array to store the data. |
| i32Length | Number of continuous floats to read. |
| i32StartScratchpadStartIndex | Starting index of the float scratchpads to read from. |
| int OptoMMP2.OptoMMP.ScratchpadI32Write | ( | int[] | i32ary, |
| int | i32StartIaryIndex, | ||
| int | i32Length, | ||
| int | i32StartScratchpadStartIndex | ||
| ) |
Write a block of 32-bit signed-integer scratchpad registers.
Divides the writes of up to 256 elements to satisfy the transfer.
Not cachable.
SNAP-UP1-xxx family of controllers only support indices 0-1023.
| i32ary | Array of 32-bit integer values to write. |
| i32StartIaryIndex | Start index of the 32-bit integer array. |
| i32Length | Number of float elements to write. |
| i32StartScratchpadStartIndex | Starting 32-bit integer scratchpad element to write. |
| int OptoMMP2.OptoMMP.ScratchPadI64NumberofElements | ( | ) |
Maximum number of elements in the 64-bit Integer Scratchpad Array.
| int OptoMMP2.OptoMMP.ScratchpadI64Read | ( | ref long[] | i64ary, |
| int | i32StartIaryIndex, | ||
| int | i32Length, | ||
| int | i32StartScratchpadStartIndex | ||
| ) |
Read the 64-bit signed-integer (long) scratchpad registers
Internally, this method reads 64-bit integers in 128 element blocks.
May returned a cached value depending on the data freshness.
| i64ary | Array to store read values. |
| i32StartIaryIndex | Starting index in i64ary to store values. |
| i32Length | Length of the read request. |
| i32StartScratchpadStartIndex | First element of the scratchpad array to start reading from. |
| int OptoMMP2.OptoMMP.ScratchpadI64Write | ( | long[] | i64ary, |
| int | i32StartIaryIndex, | ||
| int | i32Length, | ||
| int | i32StartScratchpadStartIndex | ||
| ) |
Write a block of 64-bit signed integer scratchpad registers.
Writes longer than 128 elements are divided into 128 maximum element sized writes.
Not cachable.
| i64ary | Array of 64-bit integer values to write. |
| i32StartIaryIndex | Start index of the 64-bit integer array. |
| i32Length | Number of float elements to write. |
| i32StartScratchpadStartIndex | Starting 64-bit integer scratchpad element to write. |
| int OptoMMP2.OptoMMP.ScratchPadStringNumberofElements | ( | ) |
Maximum number of elements in the String Scratchpad Array.
| int OptoMMP2.OptoMMP.ScratchpadStringRead | ( | ref string[] | strary, |
| int | i32StartStraryIndex, | ||
| int | i32Length, | ||
| int | i32StartScratchpadStartIndex | ||
| ) |
Read the string scratchpad registers.
Internally, this method reads strings in 8 string-element chunks.
May returned a cached value depending on the data freshness.
String scratchpads are intended for only ASCII based strings.
A correction to this method was made on 10-14-2011. Problems arose with 9.x firmware or later and if less than 64 scratchpad strings were read.
| strary | Array of strings to read. |
| i32StartStraryIndex | Starting index in string to store values. |
| i32Length | Length of the read request. |
| i32StartScratchpadStartIndex | First element of the scratchpad array to start reading from. |
| int OptoMMP2.OptoMMP.ScratchpadStringWrite | ( | string[] | strary, |
| int | i32StartStraryIndex, | ||
| int | i32Length, | ||
| int | i32StartScratchpadStartIndex | ||
| ) |
Write a block of string scratchpad registers.
Writes longer than 4 elements are divided into 4-element chunks.
String scratchpads are intended for only ASCII based strings.
| strary | Array of strings to write. |
| i32StartStraryIndex | Start index of the string array. |
| i32Length | Number of strings elements to write. |
| i32StartScratchpadStartIndex | Starting string scratchpad element to write. |
| void OptoMMP2.OptoMMP.SetCacheFreshness | ( | int | i32FreshnessMs | ) |
Sets the data cache freshness value.
This edition of the OptoMMP library supports data read caching. When certain areas of the Opto MMP memory map are read, the data reported may be cached. Subsequent accesses to the same Opto MMP address space may use the cached data if the freshness for the area has not expired.
Data caching is intended to reduce the amount of network traffic and messaging of the I/O unit. Experience shows us that many users use point type of access methods and not bank methods. This tends to generate an excessive amount of I/O traffic. Data caching will substantially reduce network rates and dramatically increase the application's throughput.
Freshness may not be acceptable in applications where fastest response time is needed. In these cases, setting the freshness to zero disables all caching. An application may choose when to enable or disable the read data cache... but you could generate a LOT of network traffic.
When this member is invoked, the entire data cache is invalidated.
Only analog and digital states, analog max-mins, and digital latches are cached. Read and clear options do not cache data.
The default freshness is 100ms.
Writes are not cached.
Negative freshness values will be treated as zero.
| i32FreshnessMs | New freshness value. |
| Int32 OptoMMP2.OptoMMP.StartPulse | ( | IoModel | eIoModelOfPointIndex, |
| Int32 | i32PointIndex64or512 | ||
| ) |
Start a pulse train.
| eIoModelOfPointIndex | Specifies the point index of the model. |
| i32PointIndex64or512 | Poing index number for either the 64 or 512 point model. |
| Int32 OptoMMP2.OptoMMP.StopPulse | ( | IoModel | eIoModelOfPointIndex, |
| Int32 | i32PointIndex64or512, | ||
| Boolean | bTurnOn | ||
| ) |
Stop a pulse. Note, writing a discrete point state cancels an operating pulse.
| eIoModelOfPointIndex | Specifies the which model (64- or 512-point) the point index represents. |
| i32PointIndex64or512 | Poing index number for either the 64 or 512 point model. |
| bTurnOn | When true, terminates the pulse and leave the output on. False terminates the pulse and leaves the output off. |
| int OptoMMP2.OptoMMP.WriteAnalogEu512 | ( | int | i32Point, |
| Single | f32Value | ||
| ) |
Write an analog output in the 512-Point IO Unit model.
If you would like to write all analog outputs at once, use the WriteAnalogEu64 method.
| i32Point | The point number, range 0 to 511. |
| f32Value | The value to write. |
| int OptoMMP2.OptoMMP.WriteAnalogLoadCellConfiguration4096 | ( | int | i32PointNumber, |
| uint | u32FastSettle, | ||
| uint | u32FilterWeight | ||
| ) |
Write analog load cell configuration in 4,096 point area.
This just sets a load-cell module's fast-settle and filter weight parameters.
While this is a configuration function, the data lies within the analog point write area (kind of unusual).
| i32PointNumber | Point Number, 0 to 511. |
| u32FastSettle | Load cell input fast settle value. See form 1465 for values. Library does not check for invalid values. |
| u32FilterWeight | Filter weight value. See form 1465 for values. Library does not check for invalid values. |
| int OptoMMP2.OptoMMP.WriteAnalogLoadCellConfiguration64 | ( | int | i32PointNumber, |
| uint | u32FastSettle, | ||
| uint | u32FilterWeight | ||
| ) |
Write analog load cell configuration in 64 Point Area.
Configures the analog load cell's parameters (fast-settle and filter weight).
While this is a configuration function, the data lies within the analog point write area (kind of unusual).
| i32PointNumber | The 64-point rack's number, from 0 to 63. |
| u32FastSettle | The fast settle parameter, see form 1465 for values (this value is not checked by this library). |
| u32FilterWeight | The filter weight setting, see form 1465 for values (value is not check by this library). |
| int OptoMMP2.OptoMMP.WriteAnalogPointConfiguration4096 | ( | int | i32PointNumber, |
| int | i32PointType, | ||
| Single | fHighScale, | ||
| Single | fLowScale, | ||
| Single | fOffset, | ||
| Single | fGain, | ||
| Single | fFilterWeight, | ||
| bool | bEnableWatchdog, | ||
| Single | fWatchdogValue | ||
| ) |
Write Analog Point configuration in 4096 Point Area.
This area must be configured before points may be read in the 512-point area.
Useful for setting all configuration values of an analog point (input or output).
| i32PointNumber | Point Number, 0 to 511. |
| i32PointType | The point type. |
| fHighScale | Upper Scale Value (when input is 100%). |
| fLowScale | Lower Scale Value (when input is either 0% [unipolar] or -100% [bipolar]). |
| fOffset | Offset. |
| fGain | Gain. |
| fFilterWeight | Filter Weight (0.0 disables or positive values). |
| bEnableWatchdog | Enable analog communication watchdog. |
| fWatchdogValue | The value to force whhen communication watchdog occurs. |
| int OptoMMP2.OptoMMP.WriteAnalogPointConfiguration4096 | ( | int | i32PointNumber, |
| int | i32PointType | ||
| ) |
Write Point configuration in 4096 Point Area.
This area must be configured before points may be read in the 512-point area.
Useful for setting the point's type such as setting a linearized thermocouple's probe type, a digital input or output, or setting an analog input to a specific input range and want to read the input as measurement units (volts, amps, etc).
| i32PointNumber | Point Number, 0 to 4095. |
| i32PointType | The point type. |
| int OptoMMP2.OptoMMP.WriteAnalogPointConfiguration64 | ( | int | i32PointNumber, |
| int | i32PointType, | ||
| Single | fHighScale, | ||
| Single | fLowScale, | ||
| Single | fOffset, | ||
| Single | fGain, | ||
| Single | fFilterWeight, | ||
| bool | bEnableWatchdog, | ||
| Single | fWatchdogValue | ||
| ) |
Write Analog Point configuration in 64 Point Area.
configures all the basic analog point configuration values.
| i32PointNumber | Point Number, 0 to 63. |
| i32PointType | The point type. |
| fHighScale | Upper Scale Value (when input is 100%). |
| fLowScale | Lower Scale Value (when input is either 0% [unipolar] or -100% [bipolar]). |
| fOffset | Offset. |
| fGain | Gain. |
| fFilterWeight | Filter Weight (0.0 disables or positive values). |
| bEnableWatchdog | Enable analog communication watchdog. |
| fWatchdogValue | The value to force whhen communication watchdog occurs. |
| int OptoMMP2.OptoMMP.WriteAnalogState64 | ( | int | i32PointNumber, |
| AnalogWriteOptions | eOption, | ||
| Single | fWriteValue | ||
| ) |
Sets a Single Analog State in the 64-Point IO Unit Memory Map.
This method does not cache values.
| i32PointNumber | The point number to write, 0 to 63. |
| eOption | The enumeration of the value option to be written. |
| fWriteValue | The value to write. |
| int OptoMMP2.OptoMMP.WriteAnalogStates64 | ( | Single[] | faryValues, |
| bool | bEngineeringUnits, | ||
| int | i32StartIndex | ||
| ) |
Set analog outputs in engineering units as a 64-point bank write.
| faryValues | Array storing values to write. Must contain at least i32StartIndex + 64 elements in length. |
| bEngineeringUnits | When true writes engineering units. False writes counts (typically 0 to 4095). |
| i32StartIndex | Starting index in the array to write values from. |
| int OptoMMP2.OptoMMP.WriteBrainStreamingConfiguration | ( | int | i32IntervalMs, |
| int | i32UdpPortDestination, | ||
| string[] | saryIpAddresses, | ||
| long | i64OptoMMPAddress, | ||
| int | i32LengthOfStream | ||
| ) |
Configure the brain streaming functionality.
Once successfully using this method, you must use EnableBrainStreaming() to enable streaming. This method does not automatically enable streaming>
This function will disable streaming if it is enabled.
This function disables mirroring. If you want mirroring, use PAC Manager to configure the brain instead.
| i32IntervalMs | Interval in milliseconds to stream. |
| i32UdpPortDestination | UDP Client port to use. |
| saryIpAddresses | Array of IP addresses (in dot format) to stream too. |
| i64OptoMMPAddress | If not default, the OptoMMP address to use. |
| i32LengthOfStream | Length of the non-default OptoMMP area to use. |
| int OptoMMP2.OptoMMP.WriteDateTime | ( | string | sDateTime | ) |
Write the Date-Time String to the IO Unit.
The string format must be in this form, 'YYYY-MM-DD HH:MM:SS.00'.
| sDateTime | String with the date time to set. |
| int OptoMMP2.OptoMMP.WriteDigitalEnableorDisableCounter64 | ( | int | i32PointNumber, |
| bool | bActivate | ||
| ) |
Enable or disable a digital counter, 64-point rack.
This method does not cache data.
This method only works with the 64-point I/O unit properties.
| i32PointNumber | The point number, 0 through 63. |
| bActivate | When true, activates the counter. |
| int OptoMMP2.OptoMMP.WriteDigitalEnableorDisableCounters64 | ( | long | i64ActivateBitMask, |
| long | i64DeactivateBitMask | ||
| ) |
Enable or disable a bank of counters in the 64-point rack.
This method does not cache data.
Warning. Enabling or disabling a counter at the same time has unpredictable results.
This method only works with the 64-point I/O unit properties.
| i64ActivateBitMask | Bitmask to enable a counter. A bit value of one enables a counter. |
| i64DeactivateBitMask | Bitmask to disable a counter. A bit value of one disables a counter. |
| int OptoMMP2.OptoMMP.WriteDigitalEnableorDisableCounters64 | ( | bool[] | baryActivate, |
| bool[] | baryDeactivate, | ||
| int | i32StartIndex | ||
| ) |
Enable or Disable All 64 Digital Counters From Boolean Arrays
| baryActivate | Boolean array to activate counters, length must be at least i32StartIndex + 64. |
| baryDeactivate | Boolean array to deactivate counters, length must be at least i32StartIndex + 64. |
| i32StartIndex | Starting index to retrieve states from. |
| int OptoMMP2.OptoMMP.WriteDigitalPointConfiguration64 | ( | int | i32PointNumber, |
| bool | bOutput, | ||
| eDigitalFeature | eFeature, | ||
| bool | bEnableWatchdog, | ||
| bool | bWatchdogValue | ||
| ) |
Write the digital point configuration.
| i32PointNumber | Point Number 0 to 63. |
| bOutput | For digital outputs, set true. |
| eFeature | Digital Feature To Set. If no feature, select None. |
| bEnableWatchdog | Enable the communication watchdog. |
| bWatchdogValue | The state when the communication watchdog trigges, true is "on". |
| int OptoMMP2.OptoMMP.WriteDigitalState64 | ( | int | i32PointNumber, |
| bool | bOn | ||
| ) |
Set a single state of a 4-channel digital output, 64-point rack.
This method does not cache data.
The digital output must be configured before the output will turn on.
This method only works with the 64-point I/O unit properties.
| i32PointNumber | Digital point number to set, 0 through 63. |
| bOn | True, turns the output on, false turns the output off. |
| int OptoMMP2.OptoMMP.WriteDigitalStates64 | ( | long | i64StateBitMask | ) |
Sets all of the 4-channel digital states in the 64-point rack.
The digital output must be configured before the output will turn on.
This method only works with the 64-point I/O unit properties.
| i64StateBitMask | 64-bit bitmask of states, a bit value of 1 is on, 0 is off. |
| int OptoMMP2.OptoMMP.WriteDigitalStates64 | ( | ref bool[] | baryStates, |
| int | i32StartIndex | ||
| ) |
Write All 64 Digital States Using A Boolean Array.
The boolean array arguments must be at least i32StartIndex + 64 in length.
| baryStates | Array of states, true is on, false is off. |
| i32StartIndex | Starting index of the array to begin using states. |
| int OptoMMP2.OptoMMP.WriteDigitalStatesMoMo64 | ( | long | i64OnMask, |
| long | i64OffMask | ||
| ) |
Writes All 64 Digital States From "Must-On/Must-Off" (MoMo) Bit Masks
| i64OnMask | The points to be forced on. Bit value of 1 turns on, 0 leaves point state unaffected. |
| i64OffMask | The points to be forced off. Bit value of 1 turns off, 0 leaves point state unaffected. |
| int OptoMMP2.OptoMMP.WriteDigitalStatesMoMo64 | ( | bool[] | baryOnStates, |
| bool[] | baryOffStates, | ||
| int | i32StartIndex | ||
| ) |
Writes All 64 Digital States From "Must-On/Must-Off" (MoMo) Boolean Arrays
| baryOnStates | The points to be forced on. True turns on, false leaves point state unaffected. |
| baryOffStates | The points to be forced off. True turns off, false leaves point state unaffected. |
| i32StartIndex | Starting index to read states from. |
| int OptoMMP2.OptoMMP.WriteFOrCStatus | ( | bool | bIsFahrenheit | ) |
Force Brain to Report Temperature as Celsius or Fahrenheit
Temperature values should not be read within 1 to 3 seconds of this method. Reading too early may report the wrong temperature value. If you have an application that has to change temperature scale often or requires different temperature scale, do not constantly use this method due to update latency. Consider reading the temperature values in a constant setting and performing the conversions in your application.
| bIsFahrenheit | True sets the brain to report Fahrenheit, False, Celsius. |
| int OptoMMP2.OptoMMP.WriteHighDensityDigitalStates | ( | int | i32StartModule, |
| int | i32EndModule, | ||
| bool[] | baryStates, | ||
| int | i32StartIndex | ||
| ) |
Write High-Density Digital States, Module by Module Using A Boolean Array
| i32StartModule | Starting module number, values 0 through 15. |
| i32EndModule | Last module to write, values 0 through 15 (must be equal or higher to i32StartModule). |
| baryStates | Array of boolean states. Needs to be (i32EndModule - i32StartModule + 1) * 32 + i32ArrayStartIndex in length. |
| i32StartIndex | Starting index in the boolean array retrieve states to be written. |
| int OptoMMP2.OptoMMP.WriteHighDensityDigitalStates | ( | int | i32StartModule, |
| int | i32EndModule, | ||
| int[] | i32aryStates, | ||
| int | i32StartIndex | ||
| ) |
Write High-Density Digital States, Module by Module Using A Bitmask Array
| i32StartModule | Starting module number, values 0 through 15. |
| i32EndModule | Last module to write, values 0 through 15 (must be equal or higher to i32StartModule). |
| i32aryStates | Array of integer bit states. Needs to be (i32EndModule - i32StartModule + 1) + i32StartIndex in length. |
| i32StartIndex | Starting index in the boolean array retrieve states to be written. |
| int OptoMMP2.OptoMMP.WriteInts | ( | long | i64MmpAddress, |
| int | i32Length, | ||
| int[] | i32aryInts, | ||
| int | i32StartingIndex | ||
| ) |
Write a block of 32-bit integers to a specific Opto MMP Address.
There are many areas this toolkit does not support with a direct method. Use this method to access these areas.
The maximum number of elements that may be transferred is 256.
| i64MmpAddress | Starting Opto MMP Address. |
| i32Length | Length of 32-bit integers to write. |
| i32aryInts | Array of 32-bit integers. |
| i32StartingIndex | Starting index of the i32aryInts table to write from. |
| int OptoMMP2.OptoMMP.WriteLocalDateTime | ( | ) |
Write Local Date-Time To The IO Unit.
The PC's local date-time will be written to the I/O unit.
| int OptoMMP2.OptoMMP.WriteLongs | ( | long | i64MmpAddress, |
| int | i32Length, | ||
| long[] | i64aryLongs, | ||
| int | i32StartingIndex | ||
| ) |
Write a block of longs (64-bit signed values) to the Opto MMP Device.
There are many areas this toolkit does not support with a direct method. Use this method to access these areas.
The maximum number of elements that may be transferred is 128 64-bit values.
| i64MmpAddress | Opto MMP Address. |
| i32Length | Quantity of longs to write. |
| i64aryLongs | Array of longs to write. |
| i32StartingIndex | Starting index of i64aryLongs to write. |
| Int32 OptoMMP2.OptoMMP.WritePid | ( | Int32 | i32PidIndex, |
| stPid | PidData, | ||
| ePidWriteOptions | eWriteOption | ||
| ) |
Write Pid (configure all or individual parameters [one at a time] of a PID)
This method does not support the SNAP-PID-V (a legacy product).
| i32PidIndex | The index of the PID. |
| PidData | The data to modify the PID with. |
| eWriteOption | The selected write to perform. |
| int OptoMMP2.OptoMMP.WritePointConfiguration64 | ( | int | i32PointNumber, |
| int | i32PointType | ||
| ) |
Write Analog Point configuration in 64 Point Area.
Sets only the point area. This is useful for setting just the point types, like when reading linearized thermocouples (scaling not required), an alternate input range on an analog input, or setting a 4-channel digital point as an input or output (no features needed).
| i32PointNumber | Point Number, 0 to 63. |
| i32PointType | The point type. |
| Int32 OptoMMP2.OptoMMP.WritePulseOnOffTime | ( | IoModel | eIoModelOfPointIndex, |
| Int32 | i32PointIndex64or512, | ||
| Single | f32OnTime, | ||
| Single | f32OffTime | ||
| ) |
Update a "time" configured pulse's on-time and off-time. Pulse must have been configured with either ConfigureContinuousPulsesTime() or ConfigureNPulsesTime() or unpredictable results will occur (even with a valid method result code).
| eIoModelOfPointIndex | Specifies the which model (64- or 512-point) the point index represents. |
| i32PointIndex64or512 | Discrete output index. |
| f32OnTime | New on-time value in seconds. |
| f32OffTime | New off-time value in seconds. |
| Int32 OptoMMP2.OptoMMP.WritePulsePercentage | ( | IoModel | eIoModelOfPointIndex, |
| Int32 | i32PointIndex64or512, | ||
| Single | f32Percent | ||
| ) |
Write pulse percentage. Useful for continuous pulse trains... for example, time-proprotional outputs (e.g. heater applications).
Values less than 0.0 are treated as zero. Values above 100.0 are treated as 100.0.
The specified TPO must have been set using ConfigureContinuousPulsesDuration() or ConfigureNPulsesDuration(). Otherwise, the result of f32Percent is unpredictable even with a successful result code.
| eIoModelOfPointIndex | Specifies the which model (64- or 512-point) the point index represents. |
| i32PointIndex64or512 | Index for the 64 or 512 point model index for the specific discrete output used. |
| f32Percent | Percentage to set the continuous pulse train. |
| Int32 OptoMMP2.OptoMMP.WritePulsePeriod | ( | IoModel | eIoModelOfPointIndex, |
| Int32 | i32PointIndex64or512, | ||
| Single | f32Period | ||
| ) |
Write the pulse period.
The specified TPO must have been set using ConfigureContinuousPulsesDuration() or ConfigureNPulsesDuration() or the result of this operation is unpredictable.
| eIoModelOfPointIndex | Specifies the which model (64- or 512-point) the point index represents. |
| i32PointIndex64or512 | Index for the 64 or 512 point model index for the specific discrete output used. |
| f32Period | Pulse period in seconds. |
| int OptoMMP2.OptoMMP.WriteScannerFlags | ( | int | i32ScannerFlags | ) |
Write the scanner flags to the OptoMMP device.
These parameters must be stored to flash. The device should also be rebooted for the flags to take effect.
Added April 30, 2010.
| i32ScannerFlags | Bit packed array to write to location. |
| int OptoMMP2.OptoMMP.WriteSerialModuleConfiguration | ( | int | i32PortNumber, |
| int | i32TcpPort, | ||
| int | i32BaudRate, | ||
| SerialParity | eParity, | ||
| byte | byDataBits, | ||
| byte | byStopBits, | ||
| bool | bHardwareFlowControl, | ||
| bool | bTestMessage, | ||
| int | i32Eom, | ||
| bool | b4WireMode | ||
| ) |
Write the Serial Port Configuration. Only for Module based Serial Ports.
| i32PortNumber | Serial port number to write too, values 0 through 31. See GetSerialOrSsiPortIndexFromModuleAndChannel(). |
| i32TcpPort | TCP/IP Service port this serial port is associated too. |
| i32BaudRate | Baud rate of the serial port. |
| eParity | Parity enumeration the port. |
| byDataBits | Number of Data Bits. |
| byStopBits | Number of Stop Bits. |
| bHardwareFlowControl | Hardware Flow Control. |
| bTestMessage | Powerup Test Message. |
| i32Eom | 32-bit Value of End-Of-Message. |
| b4WireMode | Two or Four-Wire Mode (for 485/422 serial modules). |
| int OptoMMP2.OptoMMP.WriteSingles | ( | long | i64MmpAddress, |
| int | i32Length, | ||
| Single[] | f32arySingles, | ||
| int | i32StartingIndex | ||
| ) |
Write a block of Singles to the Opto MMP Device.
There are many areas this toolkit does not support with a direct method. Use this method to access these areas.
The maximum number of elements that may be transferred is 256.
| i64MmpAddress | Opto MMP Address. |
| i32Length | Quantity of Singles to write. |
| f32arySingles | Array of singles to write. |
| i32StartingIndex | Starting index of f32arySingles to write. |
| int OptoMMP2.OptoMMP.WriteSsiModuleConfiguration | ( | int | i32PortNumber, |
| int | i32FrameSize, | ||
| float | f32ClockSpeedkHz, | ||
| float | f32InterFrameTimeUs, | ||
| int | i32MsbOffset, | ||
| int | i32DataBits, | ||
| int | i32ErrorBitOffset, | ||
| bool | bErrorBitLowIsError, | ||
| eDataCode | eCoding, | ||
| bool | bEnabled | ||
| ) |
Writes the SSI Module configuration
This function requires SNAP-PAC firmware R8.5C or later.
| i32PortNumber | The SSI module port number, values range from 0 to 31. See GetSerialOrSsiPortIndexFromModuleAndChannel(). |
| i32FrameSize | Length of the entire data frame in bits. |
| f32ClockSpeedkHz | Frequency of the transducer (in kHz). |
| f32InterFrameTimeUs | Time between data frames (in microseconds). |
| i32MsbOffset | Location of the data MSB in the data frame. Starts from zero. |
| i32DataBits | Location of the data bit in the frame. Starts from clock zero. |
| i32ErrorBitOffset | Location of the error bit in the frame. Starts from clock zero. |
| bErrorBitLowIsError | Active status of the error bit. |
| eCoding | Encoding of the transducer. |
| bEnabled | Enables the brain to scan the SNAP-SCM-SSI module. |
| int OptoMMP2.OptoMMP.WriteStatusCommand | ( | StatusWriteCommand | eCommand | ) |
Writes a Status Command to Opto MMP Address 0xffff f038 0000 (see Opto 22 Form 1465, Section "Status Area Write - Read/Write")
When using command type ResetHardware, the device will physically reboot. If you are using a TCPIP connection, it will be severed, close this session after this method returns.
Some commands like StoreToFlash and EraseFlash will take up to 5 seconds to complete. Update the timeout accordingly.
| int OptoMMP2.OptoMMP.WriteStrategyStreaming | ( | string | sCommHandle, |
| Single | fInterval, | ||
| int | i32Objects, | ||
| bool | bStoreToFlash | ||
| ) |
Write the "Strategy Streaming" Config.
Only used on SNAP-PAC-R controllers running the "streaming strategy" for additional I/O streaming capabilities.
| sCommHandle | Comm handle where to stream too. Handle looks like "udp:10.192.0.7:5002". |
| fInterval | Time interval in seconds to stream. |
| i32Objects | Bitmask of data objects to stream. |
| bStoreToFlash | When true, store these parameters to non-volatile memory. |
| int OptoMMP2.OptoMMP.WriteWatchdogTime | ( | int | i32WatchdogTimeMs | ) |
Set the Communication Watchdog Timeout of the IO unit.
The only method an application may detect a timeout (or possibly the I/O unit resetting) is to configure a 4-channel digital output and turn it on. Should it go off, this would indicate a communication watchdog event or a power-cycling reset event.
| i32WatchdogTimeMs | Time in milliseconds to set the timeout value. |
| const Int32 OptoMMP2.OptoMMP.i32cMaximumPulseObjects = 512 |
SNAP-PAC-R1/2 and SNAP-PAC-EB1/2 have 512 pulse objects available.