|
OptoMMP3
|
Object for communicating with Opto MMP Devices. Assembly Version 3.0.3.0. 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(). More... | |
Public Member Functions | |
| OptoMMP () | |
| Constructor More... | |
| Int32 | Open (String sHost, Int32 i32Port, Connection eType, Int32 i32InitialTimeoutMs, Boolean 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. More... | |
| Int32 | OpenSerialBinary (String sCommPort, Int32 i32BaudRate) |
| Open a serial (binary) connection to a string of I/O units. The OptoMMP SDK uses only a Windows COM port. Your COM port may be an add-in card or a USB to Serial Converter (that emulates a COM port). More... | |
| void | Close () |
| Close the OptoMMP device connection. More... | |
| Int32 | 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") Should a different command be needed that is not in the StatusWriteCommand enumeration, directly write the numeric value to 0xffff f038 0000. More... | |
| Int32 | WriteFOrCStatus (Boolean bIsFahrenheit) |
| Force Brain to Report Temperature as Celsius or Fahrenheit More... | |
| Int32 | ReadFOrCStatus (out Boolean bIsFahrenheit) |
| Read the Temperature Reporting Status of the Brain More... | |
| Int32 | WriteWatchdogTime (Int32 i32WatchdogTimeMs) |
| Set the Communication Watchdog Timeout of the IO unit. More... | |
| Int32 | ReadWatchdogTime (out Int32 i32WatchdogTimeMs) |
| Read the Device's Communication Watchdog Timeout More... | |
| Int32 | ReadDateTime (out String sDateTime) |
| Read the Date and Time of the I/O Unit More... | |
| Int32 | WriteDateTime (String sDateTime) |
| Write the Date-Time String to the IO Unit. More... | |
| Int32 | WriteLocalDateTime () |
| Write Local Date-Time To The IO Unit. More... | |
| Int32 | ReadScannerFlags (out Int32 i32ScannerFlags) |
| Read the scanner flags of the control engine. More... | |
| Int32 | WriteScannerFlags (Int32 i32ScannerFlags) |
| Write the scanner flags to the OptoMMP device. More... | |
| Int32 | ReadSerialModuleConfiguration (Int32 i32PortNumber, out Int32 i32TcpPort, out Int32 i32BaudRate, out SerialParity eParity, out Byte byDataBits, out Byte byStopBits, out Boolean bHardwareFlowControl, out Boolean bTestMessage, out Int32 i32Eom, out Boolean b4WireMode) |
| Read the Serial (Module) Port Configuration. Only for Module based Serial Ports. Only supported on Ethernet based brains and controllers. More... | |
| Int32 | WriteSerialModuleConfiguration (Int32 i32PortNumber, Int32 i32TcpPort, Int32 i32BaudRate, SerialParity eParity, Byte byDataBits, Byte byStopBits, Boolean bHardwareFlowControl, Boolean bTestMessage, Int32 i32Eom, Boolean b4WireMode) |
| Write the Serial Port Configuration. Only for Module based Serial Ports. Only supported on Ethernet based brains and controllers. More... | |
| Int32 | ReadSsiModuleConfiguration (Int32 i32PortNumber, out Int32 i32FrameSize, out Single f32ClockSpeedkHz, out Single f32InterFrameTimeUs, out Int32 i32MsbOffset, out Int32 i32DataBits, out Int32 i32ErrorBitOffset, out Boolean bErrorBitLowIsError, out eDataCode eCoding, out Boolean bEnabled) |
| Read the SSI module configuration More... | |
| Int32 | WriteSsiModuleConfiguration (Int32 i32PortNumber, Int32 i32FrameSize, Single f32ClockSpeedkHz, float f32InterFrameTimeUs, Int32 i32MsbOffset, Int32 i32DataBits, Int32 i32ErrorBitOffset, Boolean bErrorBitLowIsError, eDataCode eCoding, Boolean bEnabled) |
| Writes the SSI Module configuration More... | |
| Int32 | WriteBrainStreamingConfiguration (Int32 i32IntervalMs, Int32 i32UdpPortDestination, String[] saryIpAddresses, UInt32 u32OptoMMPAddress, Int32 i32LengthOfStream) |
| Configure the brain streaming functionality. More... | |
| Int32 | EnableBrainStreaming (Boolean bEnableStreaming) |
| Controls the enable/disable functionality of brain streaming. Functionality only exists on Ethernet based I/O units. More... | |
| Int32 | ReadBrainStreamingConfiguration (out Boolean bIsEnabled, out Int32 i32IntervalMs, out Int32 i32UdpPortDestination, out String[] saryIpAddresses, out UInt32 u32OptoMMPAddress, out Int32 i32LengthOfStream) |
| Read the Brain Streaming configuration. More... | |
| Int32 | ScratchpadBitsRead (out UInt64 u64ScratchpadBitmask) |
| Read scratchpad bits as a 64-bit bitmask. More... | |
| Int32 | ScratchpadBitsRead (Boolean[] baryScratchpad, Int32 i32StartIndex) |
| Read Scratchpad Bits Into A Boolean Array More... | |
| Int32 | ScratchpadBitRead (out Boolean bState, Int32 i32Index) |
| Read Scratchpad Bit More... | |
| Int32 | ScratchpadBitsWrite (UInt64 u64OnMask, UInt64 u64OffMask) |
| Writes all 64 scratchpad bit states using turn-on and turn-off bitmasks. More... | |
| Int32 | ScratchpadBitsWrite (Boolean[] baryOnStates, Boolean[] baryOffStates, Int32 i32StartIndex) |
| Writes All 64 Scratchpad Bitstates From "Must-On/Must-Off" (MoMo) Boolean Arrays More... | |
| Int32 | ScratchpadBitWrite (Boolean bState, Int32 i32Index) |
| Write Scratchpad Bit More... | |
| Int32 | ScratchPadF32NumberofElements () |
| Maximum number of elements in the Float Scratchpad Array. More... | |
| Int32 | ScratchpadFloatRead (Single[] fary, Int32 i32StartFaryIndex, Int32 i32Length, Int32 i32StartScratchpadStartIndex) |
| Read a block of 32-bit floating point (Single) scratchpad registers. More... | |
| Int32 | ScratchpadFloatWrite (Single[] fary, Int32 i32StartFaryIndex, Int32 i32Length, Int32 i32StartScratchpadStartIndex) |
| Write a block of float scratchpad registers. More... | |
| Int32 | ScratchPadI32NumberofElements () |
| Maximum number of elements in the 32-bit Integer Scratchpad Array. More... | |
| Int32 | ScratchpadI32Read (Int32[] i32ary, Int32 i32StartIaryIndex, Int32 i32Length, Int32 i32StartScratchpadStartIndex) |
| Read a block of 32-bit signed-integer scratchpad registers. More... | |
| Int32 | ScratchpadI32Write (Int32[] i32ary, Int32 i32StartIaryIndex, Int32 i32Length, Int32 i32StartScratchpadStartIndex) |
| Write a block of 32-bit signed-integer scratchpad registers. More... | |
| Int32 | ScratchPadI64NumberofElements () |
| Maximum number of elements in the 64-bit Integer Scratchpad Array. More... | |
| Int32 | ScratchpadI64Read (Int64[] i64ary, Int32 i32StartIaryIndex, Int32 i32Length, Int32 i32StartScratchpadStartIndex) |
| Read the 64-bit signed-integer (Int64) scratchpad registers More... | |
| Int32 | ScratchpadI64Write (Int64[] i64ary, Int32 i32StartIaryIndex, Int32 i32Length, Int32 i32StartScratchpadStartIndex) |
| Write a block of 64-bit signed integer scratchpad registers. More... | |
| Int32 | ScratchPadStringNumberofElements () |
| Maximum number of elements in the String Scratchpad Array. More... | |
| Int32 | ScratchpadStringRead (String[] strary, Int32 i32StartStraryIndex, Int32 i32Length, Int32 i32StartScratchpadStartIndex) |
| Read the string scratchpad registers. More... | |
| Int32 | ScratchpadStringWrite (String[] strary, Int32 i32StartStraryIndex, Int32 i32Length, Int32 i32StartScratchpadStartIndex) |
| Write a block of string scratchpad registers. More... | |
| Int32 | ReadDigitalStates64 (out Int64 i64DigitalStatesBitmask) |
| Read digital states as a 64-bit Bitmask. More... | |
| Int32 | ReadDigitalStates64 (out UInt64 u64DigitalStatesBitmask) |
| Read digital states as a 64-bit Bitmask as a UInt64 More... | |
| Int32 | ReadDigitalStates64 (Boolean[] baryDigitalStates64, Int32 i32StartIndex) |
| Read 64 Digital States Into A Boolean Array More... | |
| Int32 | ReadDigitalState64 (Int32 i32PointNumber, out Boolean bState) |
| Read the individual digital state by specifying the point number. More... | |
| Int32 | ReadDigitalLatches64 (out Int64 i64OnLatchBitMask, out Int64 i64OffLatchBitMask) |
| Read all On and Off Latch States of the 64 Point I/O Unit Rack at Bitmasks. More... | |
| Int32 | 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... | |
| Int32 | ReadDigitalLatches64 (Boolean[] baryOnLatches, Boolean[] baryOffLatches, Int32 i32StartIndex) |
| Read all On and Off Latch States of the 64 Point I/O Unit Rack with Boolean arrays. More... | |
| Int32 | ReadDigitalLatch64 (Int32 i32PointNumber, out Boolean bOnLatch, out Boolean bOffLatch) |
| Read the Digital Latches Selected by a Point Number. More... | |
| Int32 | ReadClearDigitalLatches64 (Boolean bReadAndClearLatches, out Int64 i64LatchBitmask) |
| Read and clear digital latches in the 64-point area. More... | |
| Int32 | ReadClearDigitalLatches64 (Boolean bOnLatches, out UInt64 u64LatchBitmask) |
| Read and clear digital latches in the 64-point area, with a UInt64 latch bitmask. More... | |
| Int32 | ReadClearDigitalLatches64 (Boolean bOnLatches, Boolean[] baryLatches, Int32 i32StartIndex) |
| Read and clear digital latches in the 64-point area, with a UInt64 latch bitmask. More... | |
| Int32 | ReadClearDigitalLatch64 (Int32 i32PointNumber, Boolean bOnLatch, out Boolean bLatchState) |
| Read and clear a digital latch. More... | |
| Int32 | ReadOptionallyClearCounters64 (Boolean bClear, UInt32[] u32aryCounters, Int32 i32StartIndex) |
| Read and optionally clear all 64 counters. More... | |
| Int32 | ReadOptionallyClearCounter64 (Int32 i32PointNumber, Boolean bClear, out UInt32 u32Counter) |
| Read and optionally clear a counter on the 64 point rack. More... | |
| Int32 | WriteDigitalStates64 (Int64 i64StateBitMask) |
| Sets all of the 4-channel digital states in the 64-point rack. More... | |
| Int32 | WriteDigitalStates64 (Boolean[] baryStates, Int32 i32StartIndex) |
| Write All 64 Digital States Using A Boolean Array. More... | |
| Int32 | WriteDigitalStatesMoMo64 (Int64 i64OnMask, Int64 i64OffMask) |
| Writes All 64 Digital States From "Must-On/Must-Off" (MoMo) Bit Masks More... | |
| Int32 | WriteDigitalStatesMoMo64 (Boolean[] baryOnStates, Boolean[] baryOffStates, Int32 i32StartIndex) |
| Writes All 64 Digital States From "Must-On/Must-Off" (MoMo) Boolean Arrays More... | |
| Int32 | WriteDigitalState64 (Int32 i32PointNumber, Boolean bOn) |
| Set a single state of a 4-channel digital output, 64-point rack. More... | |
| Int32 | WriteDigitalEnableorDisableCounters64 (Int64 i64ActivateBitMask, Int64 i64DeactivateBitMask) |
| Enable or disable a bank of counters in the 64-point rack. More... | |
| Int32 | WriteDigitalEnableorDisableCounters64 (Boolean[] baryActivate, Boolean[] baryDeactivate, Int32 i32StartIndex) |
| Enable or Disable All 64 Digital Counters From Boolean Arrays More... | |
| Int32 | WriteDigitalEnableorDisableCounter64 (Int32 i32PointNumber, Boolean bActivate) |
| Enable or disable a digital counter, 64-point rack. More... | |
| Int32 | ReadDigitalCountersStatus64 (out Int64 i64ActivateBitMask) |
| Reads All 64 Counter Status. More... | |
| Int32 | ReadDigitalCountersStatus64 (Boolean[] baryActive, Int32 i32StartIndex) |
| Read All 64 Counter Status To A Boolean Array. More... | |
| Int32 | ReadDigitalCounterStatus64 (Int32 i32PointNumber, out Boolean bCounterStatus) |
| Read a Counter Status in the 64 Point IO Unit Memory Map. More... | |
| Int32 | ReadAnalogStates64 (Single[] f32aryData, Int32 i32StartingIndex) |
| Read all low-density (64-point) Analog Input and Output States. More... | |
| Int32 | ReadAnalogState64 (Int32 i32PointNumber, out Single f32AnalogValue) |
| Read an analog state via a point number. More... | |
| Int32 | ReadOptionallyClearAnalogMaxMin64 (Int32 i32PointNumber, Boolean bClear, out Single fMaximum, out Single fMinimum) |
| Read and clear analog maximum and minimum value of a point on a 64-point rack. More... | |
| Int32 | WriteAnalogStates64 (Single[] f32aryValues, Boolean bEngineeringUnits, Int32 i32StartIndex) |
| Set analog outputs in engineering units or counts as a 64-point bank write. More... | |
| Int32 | WriteAnalogState64 (Int32 i32PointNumber, AnalogWriteOptions eOption, Single fWriteValue) |
| Sets a Single Analog State in Engineering Units, Counts or TPO in the 64-Point IO Unit Memory Map. More... | |
| Int32 | WriteDigitalPointConfiguration64 (Int32 i32PointNumber, Boolean bOutput, eDigitalFeature eFeature, Boolean bEnableWatchdog, Boolean bWatchdogValue, String sPointName) |
| Write the digital point configuration. More... | |
| Int32 | ReadDigitalPointConfiguration64 (Int32 i32PointNumber, out Int32 i32ModuleType, out Int32 i32PointType, out Int32 i32Feature, out Boolean bWatchdogEnabled, out Boolean bWatchdogValue, out String sPointName) |
| Read the Digital Point Configuration More... | |
| Int32 | WritePointConfiguration64 (Int32 i32PointNumber, Int32 i32PointType) |
| Write/Modify Analog Point configuration or Digital Feature in 64 Point Area. More... | |
| Int32 | WriteAnalogPointConfiguration64 (Int32 i32PointNumber, Int32 i32PointType, Single f32HighScale, Single f32LowScale, Single f32Offset, Single f32Gain, Single f32FilterWeight, Boolean bEnableWatchdog, Single f32WatchdogValue, String sPointName) |
| Write Analog Point configuration in 64 Point Area. More... | |
| Int32 | ReadAnalogPointConfiguration64 (Int32 i32PointNumber, out Int32 i32ModuleType, out Int32 i32PointType, out Single f32HighScale, out Single f32LowScale, out Single f32Offset, out Single f32Gain, out Single f32FilterWeight, out Boolean bEnableWatchdog, out Single f32WatchdogValue, out String sPointName) |
| Read Analog Point Configuration in the 64-Point Area. More... | |
| Int32 | WriteAnalogLoadCellConfiguration64 (Int32 i32PointNumber, UInt32 u32FastSettle, UInt32 u32FilterWeight) |
| Write analog load cell configuration in 64 Point Area. More... | |
| Int32 | ReadAnalogLoadCellConfiguration64 (Int32 i32PointNumber, out UInt32 u32FastSettle, out UInt32 u32FilterWeight) |
| Read analog load cell configuration in the analog 64 point area (one point at a time). More... | |
| Int32 | ReadPointName64 (Int32 i32PointNumber, out String sPointName) |
| Read the Analog or Digital Point Name, using the 64-point memory model. SNAP-PAC and Legacy Ethernet based I/O units that support a point name. More... | |
| Int32 | WritePointName64 (Int32 i32PointNumber, String sPointName) |
| Write the Analog or Digital Point Name, using the 64-point memory model. SNAP-PAC and Legacy Ethernet based I/O units that support a point name. More... | |
| Int32 | WriteDigitalPointConfiguration4096 (Int32 i32PointNumber, Boolean bOutput, eDigitalFeature eFeature, Boolean bEnableWatchdog, Boolean bWatchdogValue, String sPointName) |
| Write the digital point configuration (4096 points). More... | |
| Int32 | ReadDigitalPointConfiguration4096 (Int32 i32PointNumber, out Int32 i32ModuleType, out Int32 i32PointType, out Int32 i32Feature, out Boolean bWatchdogEnabled, out Boolean bWatchdogValue, out String sPointName) |
| Read the Digital Point Configuration (4096 points). More... | |
| Int32 | ReadHighDensityDigitalStates (Boolean[] baryStates, Int32 i32StartIndex) |
| Read All 512 High-Density Digital States (32 points per module times 16 modules). More... | |
| Int32 | ReadHighDensityDigitalStates (UInt32[] u32aryBitStates, Int32 i32StartIndex) |
| Read All 512 High-Density Digital States To BitMask Array More... | |
| Int32 | ReadHighDensityDigitalState (Int32 i32PointNumber, out Boolean bState) |
| Read a high-density digital state. More... | |
| Int32 | ReadHighDensityDigitalState (Int32 i32Module, Int32 i32Point, out Boolean bState) |
| Read a high-density digital state from a module and point index. More... | |
| Int32 | ReadOptionallyClearHighDensityDigitalLatches (Boolean bClear, Boolean[] baryOnLatches, Boolean[] baryOffLatches, Int32 i32StartIndex) |
| Int32 | ReadOptionallyClearHighDensityDigitalLatches (Boolean bClear, UInt32[] u32aryOnLatches, UInt32[] u32aryOffLatches, Int32 i32StartIndex) |
| Read and Optionally Clear All 512 High-Density Latches To BitMasks (32 points per module times 16 modules) More... | |
| Int32 | ReadOptionallyClearHighDensityDigitalLatches (Int32 i32StartModule, Int32 i32EndModule, Boolean bClear, Boolean[] baryOnLatches, Boolean[] baryOffLatches, Int32 i32StartIndex) |
| Read and Optionally Clear All 512 High-Density Latches To Boolean Arrays (32 points per module times 16 modules) More... | |
| Int32 | ReadHighDensityDigitalLatch (Int32 i32Module, Int32 i32Channel, out Boolean bOnLatch, out Boolean bOffLatch) |
| Read a single high-density digital latch. More... | |
| Int32 | ReadOptionallyClearHighDensityDigitalCounters32 (Boolean bClear, UInt32[] u32aryCounters, Int32 i32StartIndex) |
| Read and Optionally clear High Density Digital Counters More... | |
| Int32 | ReadHighDensityDigitalCounter (Int32 i32Module, Int32 i32Channel, out UInt32 u32Counter) |
| Read a High-Density Digital Counter More... | |
| Int32 | WriteHighDensityDigitalStates (Int32 i32StartModule, Int32 i32EndModule, Boolean[] baryStates, Int32 i32StartIndex) |
| Write High-Density Digital States, Module by Module Using A Boolean Array More... | |
| Int32 | WriteHighDensityDigitalStates (Int32 i32StartModule, Int32 i32EndModule, Int32[] i32aryStates, Int32 i32StartIndex) |
| Write High-Density Digital States, Module by Module Using A Bitmask Array More... | |
| Int32 | WriteHighDensityDigitalState (Int32 i32Module, Int32 i32Point, Boolean bState) |
| Write An Individual High-Density Digital State More... | |
| Int32 | WriteHighDensityDigitalModule (Int32 i32Module, Boolean[] baryOnState, Boolean[] baryOffState) |
| Update High-Density Digital States of a Single Module Using Boolean Arrays. More... | |
| Int32 | WriteHighDensityDigitalModule (Int32 i32Module, UInt64 u64OnStateMask, UInt64 u64OffStateMask) |
| Update High-Density Digital States of a Single Module Using UInt64 Bitmasks. More... | |
| Int32 | ReadPointName4096 (Int32 i32PointNumber, out String sPointName) |
| Read the Analog or Digital Point Name, using the 4096-point memory model. SNAP-PAC units only. More... | |
| Int32 | WritePointName4096 (Int32 i32PointNumber, String sPointName) |
| Write the Analog or Digital Point Name, using the 4096-point memory model. SNAP-PAC units only. More... | |
| Int32 | ReadAnalogEus512 (Single[] f32aryValues, Int32 i32StartIndex) |
| Read all Analog States as Engineering Units. This method relies on the OptoMMP area "Analog EU or Digital Counter Packed Data -- Read." More... | |
| Int32 | ReadAnalogEu512 (Int32 i32Point, out Single f32Value) |
| Read a single Analog Engineering Unit Value. This method relies on the area "Analog EU or Digital Counter Packed Data -- Read." More... | |
| Int32 | WriteAnalogEu512 (Int32 i32Point, Single f32Value) |
| Write an analog output in the 512-Point IO Unit model. More... | |
| Int32 | ReadAnalogState4096 (Int32 i32Point4096Number, AnalogReadOptions eReadOption, out Single f32AnalogValue) |
| Read an analog engineering units state, counts, or TPO values via a point number. More... | |
| Int32 | ReadOptionallyClearAnalogMaxMin4096 (Int32 i32Point4096Number, Boolean bClear, out Single f32Maximum, out Single f32Minimum) |
| Read and clear analog maximum and minimum value of a point on a 4096-point rack. More... | |
| Int32 | WriteAnalogState4096 (Int32 i32Point4096Number, AnalogWriteOptions eOption, Single f32WriteValue) |
| Sets a single analog state in engineering units, Counts or TPO values in the 4096-point IO unit memory map. More... | |
| Int32 | WriteAnalogState4096v2 (Int32 i32Point4096Number, AnalogWriteOptions4096 eOption, Single f32WriteValue) |
| Sets a single analog state in engineering units, Counts or TPO values in the 4096-point IO unit memory map. More... | |
| Int32 | WriteAnalogPointConfiguration4096 (Int32 i32PointNumber, Int32 i32PointType, Single f32HighScale, Single f32LowScale, Single f32Offset, Single f32Gain, Single f32FilterWeight, Boolean bEnableWatchdog, Single f32WatchdogValue, String sPointName, Single f32LowerClamp, Single f32UpperClamp) |
| Write Analog Point configuration in 4,096 Point Area. More... | |
| Int32 | WriteAnalogPointConfiguration4096 (Int32 i32PointNumber4096, Int32 i32PointType, Single f32HighScale, Single f32LowScale, Single f32FilterWeight, Boolean bEnableWatchdog, Single f32WatchdogValue, String sPointName, Single f32LowerClamp, Single f32UpperClamp) |
| Write Analog Point configuration in 4,096 Point Area. Useful when offset and gain parameters are not required. More... | |
| Int32 | WriteAnalogPointConfiguration4096 (Int32 i32PointNumber4096, Int32 i32PointType, Single f32FilterWeight, Boolean bEnableWatchdog, Single f32WatchdogValue, String sPointName, Single f32LowerClamp, Single f32UpperClamp) |
| Write Analog Point configuration in 4,096 Point Area. Useful for thermocouple and RTD probes or analog input ranges. More... | |
| Int32 | WriteAnalogPointConfiguration4096 (Int32 i32PointNumber4096, Int32 i32PointType, String sPointName) |
| Write Analog Point configuration in 4,096 Point Area. Useful for RTDs and thermocouple modules, to just set the "probe" type or analog input ranges. More... | |
| Int32 | ReadAnalogPointConfiguration4096 (Int32 i32PointNumber, out Int32 i32PointType, out Single f32HighScale, out Single f32LowScale, out Single f32Offset, out Single f32Gain, out Single f32FilterWeight, out Boolean bEnableWatchdog, out Single f32WatchdogValue, out String sPointName, out Single f32LowerClamp, out Single f32UpperClamp) |
| Read Analog Point configuration in 4,096 Point Area. More... | |
| Int32 | WriteAnalogPointConfiguration4096 (Int32 i32PointNumber, Int32 i32PointType) |
| Write Point configuration in 4,096 Point Area. Useful for setting probe types such as thermocouples and RTDs. Will also set the analog input ranges for voltage input modules. More... | |
| Int32 | WriteAnalogLoadCellConfiguration4096 (Int32 i32PointNumber, UInt32 u32FastSettle, UInt32 u32FilterWeight) |
| Write analog load cell configuration in 4,096 point area. More... | |
| Int32 | ReadAnalogLoadCellConfiguration4096 (Int32 i32PointNumber, out UInt32 u32FastSettle, out UInt32 u32FilterWeight) |
| Reads analog load cell configuration in 4,096 point area. More... | |
| Int32 | ReadSteinhartHart4096 (Int32 i32PointNumber4096, out Single f32CoefA, out Single f32CoefB, out Single f32CoefC, out Single f32CoefSecond) |
| Read the Steinhart-Hart linearization coefficients for the specified input. Requires R9.3e firmware or later. More... | |
| Int32 | WriteSteinhartHart4096 (Int32 i32PointNumber4096, Single f32CoefA, Single f32CoefB, Single f32CoefC, Single f32CoefSecond) |
| Write Steinhart-Hart linearization coefficients to the specified point. Requires R9.3e firmware or later. More... | |
| Int32 | ReadInts (Int64 i64MmpAddress, Int32 i32Length, Int32[] i32aryInts, Int32 i32StartingIndex) |
| Read a block of integers (32-bit signed values) from the Memory Map More... | |
| Int32 | WriteInts (Int64 i64MmpAddress, Int32 i32Length, Int32[] i32aryInts, Int32 i32StartingIndex) |
| Write a block of 32-bit integers to a specific Opto MMP Address. More... | |
| Int32 | ReadUints (Int64 i64MmpAddress, Int32 i32Length, UInt32[] u32aryInts, Int32 i32StartingIndex) |
| Read a block of unsigned integers (32-bit unsigned values) from the Memory Map More... | |
| Int32 | WriteUints (Int64 i64MmpAddress, Int32 i32Length, UInt32[] u32aryInts, Int32 i32StartingIndex) |
| Write a block of 32-bit unsigned integers to a specific Opto MMP Address. More... | |
| Int32 | ReadSingles (Int64 i64MmpAddress, Int32 i32Length, Single[] f32arySingles, Int32 i32StartingIndex) |
| Read a block of Singles from the Opto MMP Device. More... | |
| Int32 | WriteSingles (Int64 i64MmpAddress, Int32 i32Length, Single[] f32arySingles, Int32 i32StartingIndex) |
| Write a block of Singles to the Opto MMP Device. More... | |
| Int32 | ReadLongs (Int64 i64MmpAddress, Int32 i32Length, Int64[] i64aryLongs, Int32 i32StartingIndex) |
| Read a block of longs (64-bit signed values) from the Opto MMP Device. More... | |
| Int32 | WriteLongs (Int64 i64MmpAddress, Int32 i32Length, Int64[] i64aryLongs, Int32 i32StartingIndex) |
| Write a block of longs (64-bit signed values) to the Opto MMP Device. More... | |
| Int32 | ReadULongs (Int64 i64MmpAddress, Int32 i32Length, UInt64[] u64aryLongs, Int32 i32StartingIndex) |
| Read a block of unsigned longs (64-bit unsigned values) from the Opto MMP Device. More... | |
| Int32 | WriteULongs (Int64 i64MmpAddress, Int32 i32Length, UInt64[] u64aryLongs, Int32 i32StartingIndex) |
| Write a block of unsigned longs (64-bit unsigned values) to the Opto MMP Device. More... | |
| void | GetExtendedErrorInformation (out String strMessage, out Boolean bCommFault, out Boolean bProtocolFault, out Boolean bArgumentFault) |
| Retrieves extended error information. This information is also logged in the computer's Application event log. More... | |
| Int32 | 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, out 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 digital 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 digital 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 digital 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 digital 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 digital 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... | |
| Int32 | ReadCustomConfiguration (Int32 i32StartIndex, Int32 i32Length, UInt32[] u32aryCustomAddresses, Int32 i32ArrayStartIndex) |
| Read OptoMMP address configuration from the custom area. More... | |
| Int32 | ReadCustomData (Int32 i32StartIndex, Int32 i32Length, UInt32[] u32aryData, Int32 i32ArrayStartIndex) |
| Read custom configured data from the custom data area. Data is always returned as UInt32. More... | |
| Int32 | WriteCustomConfiguration (Int32 i32StartIndex, Int32 i32Length, UInt32[] u32aryCustomAddresses, Int32 i32ArrayStartIndex) |
| Write custom configuration addresses to the OptoMMP "custom area." More... | |
| Int32 | WriteCustomData (Int32 i32StartIndex, Int32 i32Length, UInt32[] u32aryData, Int32 i32ArrayStartIndex) |
| Write data to the custom area. More... | |
| Int32 | WritePacSBCommunicationBlinkCodeFlag (Boolean bEnable) |
| Enable/Disable SNAP-PAC-SB communication blink code. This method enables a feature on the SNAP-PAC-SB to red blink the STAT indicator when a detected message exception occurs. More... | |
| Int32 | ReadPacSBCommunicationBlinkCodeFlag (out Boolean bEnabled) |
| Read the SNAP-PAC-SB communication blink code flag status. More... | |
Static Public Member Functions | |
| static Double | ConvertTemperature (Double dInputTemp, TemperatureScale eInScale, TemperatureScale eOutScale) |
| Convert temperatures. More... | |
| static Int32 | GetPointNumberFor64 (Int32 i32Module, Int32 i32Channel) |
| Converts Module and Channel to Point Number For 64 Point IO Unit Model. More... | |
| static Int32 | GetPointNumberFor512 (Int32 i32Module, Int32 i32Channel) |
| Converts Module and Channel to Point Number For 512 Point IO Unit Model. More... | |
| static Int32 | GetPointNumberFor4096 (Int32 i32Module, Int32 i32Channel) |
| Converts Module and Channel to Point Number For 4096 Point IO Unit Model. More... | |
| static void | GetModuleAndChannelFromPoint64 (Int32 i32Point, out Int32 i32Module, out Int32 i32Channel) |
| Converts A Point Number From The 64 Point Model To A Module And Channel Number. More... | |
| static void | GetModuleAndChannelFromPoint512 (Int32 i32Point, out Int32 i32Module, out Int32 i32Channel) |
| Converts A Point Number From The 512 Point Model To A Module And Channel Number. More... | |
| static void | GetModuleAndChannelFromPoint4096 (Int32 i32Point, out Int32 i32Module, out Int32 i32Channel) |
| Converts A Point Number From The 4096 Point Model To A Module And Channel Number. More... | |
| static Int32 | GetSerialOrSsiPortIndexFromModuleAndChannel (Int32 i32Module, Int32 i32Channel) |
| Computes A Serial Port "Index" on the rack, for serial and SSI modules. More... | |
| static String | ConvertNumberToFirmwareVersion (Int32 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... | |
| static UInt32 | SingleToUInt32 (Single f32Data) |
| Converts a UInt32 (in binary form as a single) to a single. More... | |
| static Single | UInt32ToSingle (UInt32 u32Data) |
| Converts a Single (in binary form) to a UInt32. More... | |
Public Attributes | |
| const Int32 | i32cMaximumPulseObjects = 512 |
| SNAP-PAC has 512 pulse objects available. More... | |
Properties | |
| Int64 | LastTransactionTimeMs [get] |
| Report the amount of time the last communicationt transaction consumed (in milliseconds). Includes the time consumed by transmitting the request, receiving the response, and all other associated latency. If a method that has multiple transactions was just prior used, this time represents the last transaction that occurred. More... | |
| Byte | SerialDeviceIndex [get, set] |
| Serial device index (also known as the serial address). If used More... | |
| Int32 | MinimumRecommendedTimeoutMs [get] |
| Recommended minimum timeout in milliseconds. Serial timeout is based on a 1200 byte communication response. The value offered by this property does not take into account higher latency communications (such as wide area networks) or high-latency communication links (POTS modems, satellites, wireless spread spectrum modems, etc) or USB to serial converters with latency settings configured very high. This is just an "absolute" minimum to avoid rediculous timeout settings. Use after opening an object. More... | |
| Int32 | SetAllReceiveTimeoutsMs [set] |
| Set the receive timeout for all devices in this object. Caution, too low of a timeout value may be accepted by this method. Please see MinimumRecommendedTimeoutMs for additional information. This method only applies a 50ms minimum timeout. Use when using PCI serial cards that have baud rate clock divider options. More... | |
| Int32 | ReceiveTimeoutMs [get, set] |
| Receive timeout setting for the current selected serial station or network address. More... | |
| Int32 | ReadCacheFreshnessMs [get, set] |
| Get/Set the data cache freshness value of the current device index (for TCP/UDP, always the same device, for serial, the last station address set in the property SerialDeviceIndex). More... | |
| Int32 | SetAllReadCacheFreshnessMs [set] |
| Set all this object's data cache freshness times. More... | |
| Boolean | IsCommunicationOpen [get] |
| Test if there is a possibility of communicating to the remote device. The primary object may be open but the underlying communication resource may have closed. More... | |
| Int32 | LastOptoMmpProtocolResultCode [get] |
| When a -10 Error is reported, this method returns the last Opto MMP RCode. Check Form 1465 for proper response. More... | |
Object for communicating with Opto MMP Devices. Assembly Version 3.0.3.0.
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, SNAP-PAC-EB, and now, the SNAP-PAC-SB series of I/O units.
The Opto MMP Protocol is documented in Opto 22 form 1465. The protocol is a publically available, royalty-free data protocol. Serial OptoMMP protocol has an internally documented header. We do not publish this information.
The 3.x SDK now supports the serial based SNAP-PAC-SB series of I/O units (over serial cables).
The 3.x implementation should work with on-board serial ports (with deep receive FIFOs of 128 bytes or more) and some USB to serial converters (with similar or deeper FIFOs).
Best performance is via PCI Express connected serial ports. USB to serial converters may work but with additional latency. We tested a very limited number of USB converters successfully. In lower performing applications, the latency of USB to serial converters may be acceptable.
Serial communication throughput is inherently slower compared to Ethernet. The slowness is due to two factors, the very slow data rate and only a single message may transact over a single serial network. Communication throughput may be improved by using multiple serial ports and using a separate, asynchronous thread to communicate to each serial port. A single OptoMMP object should be associated with each serial network.
For Ethernet connected devices, an object is responsible for communicating to a single Opto MMP device connection. More than one object (meaning more than one connection) may be assigned 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's connection is intended to be opened and left open as Int64 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.
For serial devices (SNAP-PAC-SB1 and SNAP-PAC-SB2), an object is assigned all the devices contained on a communication (COM) port. To communicate with a specific device, set the device address first before initiating an access method. If more than one serial port is used, multiple objects are uniquely assigned to each communication port. For best throughput, each object should be used in a private thread of execution to decrease latency by parallelizing scanning.
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 blocks (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, serial networks, or communication failures make consume a considerable amount of time. Due to this potential large consumption of time/resources, we do not recommended to implement the SDK within the context of a Windows Message/Event handler. Examples of this are mouse, forms, buttons, or other application events. This prevents the Windows "hour-glass" effect on the interface.
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). 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.
The SDK is written with optimization biased for Ethernet connected SNAP-PAC hardware. Serial devices have significantly higher communication latencies (compounded with lower and lower baud rates). Serial implementation may need to make hardware configuration consideration to positively affect communication throughput.
This library is built with the 3.5 .Net Framework. Windows 8.1 Pro users should not have to install the .Net 3.5 Framework to use this SDK.
This SDK supports Windows Windows 7 Professional (32- or 64-bit versions) and Windows 8.1 Pro (32- or 64-bit versions). Library is not tested on Windows RT.
Please use an Intel "Core 2" or AMD Athlon II/Phenom (or newer) microprocessor. Ensure your computer well exceeds a recommended configuration for the specific operating system. Please consider that the .Net framework (and your application) exercises a large amount of memory allocation/deallocation. So RAM memory headroom is a very important consideration.
This SDK should work with much more recent Atom processors. But some of these architectures are very resource inhibited and thus may encounter some hindering (unforeseen) limitations.
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.
Enumerations of the 4096-point analog value types that may be written.
Does not support the 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.
Changes made to support SNAP-PAC firmware R9.4C or later. For R9.4B or earlier, what is now called "VelocityB_Deprecated" was "VelocityB", "Isa_Obsolete" was "Isa", and "Interacting_Obsolete" was "Interacting". These will still work and report for older firmware and UIO.
For all current and new applications, use the now labelled VelocityC, Isa, Parallel, or Interacting algorithms. Retuning of PIDs are required for recompiled applications or those applications changing algorithms.
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 or Ethernet network may take up to 30 seconds to recover. A communication timeout may be falsely logged in the Windows Application Event queue. |
| 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). A communication timeout may be falsely logged in the Windows Application Event queue. |
| 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. |
Selection of temperature scales for the temperature converter. Use with the static property ConvertTemperature().
| Enumerator | |
|---|---|
| Celsius |
Celsius temperature scale. |
| Kelvin |
Kelvin temperature scale. |
| Fahrenheit |
Fahrenheit temperature scale. |
| Rankine |
Rankine temperature scale. |
| Opto22.OptoMMP3.OptoMMP.OptoMMP | ( | ) |
Constructor
| void Opto22.OptoMMP3.OptoMMP.AboutPulses | ( | ) |
Information on generating digital 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 digital output point. This point may be either a 4-channel digital output or with a "high-density" digital output. High-Density is a digital 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 digital output on or off cancels a pulse operation.
When configuring a pulse for a 4-channel digital module, ensure the point index is calculated using the GetPointIndexFor64() and set the point model type enumeration properly. For high-density digital modules, use GetPointIndexFor512 and set the IoModel enumeration.
There are limits for 4-channel digital 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 digital outputs (modules with more than 4 digital outputs), the minimum period is 1.00 seconds and a worse case accuracy of 1 second.
| void Opto22.OptoMMP3.OptoMMP.Close | ( | ) |
Close the OptoMMP device connection.
Mmp.Close();
| Int32 Opto22.OptoMMP3.OptoMMP.ConfigureContinuousPulsesDuration | ( | Boolean | bInvert, |
| Single | f32StartDelayTimeSeconds, | ||
| Single | f32OnPercent, | ||
| Single | f32PeriodSeconds, | ||
| IoModel | eIoModelOfPointIndex, | ||
| Int32 | i32PointIndex64or512 | ||
| ) |
Configure a continuous digital 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 | Digital point index to pulse too. Provide 64 point index for 4-channel digital modules, 512- for high-density. |
| Int32 Opto22.OptoMMP3.OptoMMP.ConfigureContinuousPulsesTime | ( | Boolean | bInvert, |
| Single | f32StartDelayTimeSeconds, | ||
| Single | f32OnTimeSeconds, | ||
| Single | f32OffTimeSeconds, | ||
| IoModel | eIoModelOfPointIndex, | ||
| Int32 | i32PointIndex64or512 | ||
| ) |
Configure a continuous digital 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 | Digital point index to pulse too. Provide 64 point index for 4-channel digital modules, 512- for high-density. |
| Int32 Opto22.OptoMMP3.OptoMMP.ConfigureNPulsesDuration | ( | Boolean | bInvert, |
| Single | f32StartDelayTimeSeconds, | ||
| Single | f32OnPercent, | ||
| Single | f32PeriodSeconds, | ||
| UInt32 | u32PulseQuantity, | ||
| IoModel | eIoModelOfPointIndex, | ||
| Int32 | i32PointIndex64or512 | ||
| ) |
Configure a continuous digital 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 | Digital point index to pulse too. |
| Int32 Opto22.OptoMMP3.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 | Digital point index to pulse too. Provide 64 point index for 4-channel digital 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 |
Convert temperatures.
The brain is slow to change temperature scales. Depending on the application, temperatures 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.
| dInputTemp | Input temperature value. |
| eInScale | Input temperature scale. |
| eOutScale | Output temperature scale. |
(C#)
dDegreesF = OptoMMP.ConvertTemperature(dDegreesC, OptoMMP.TemperatureScale.Celsius, OptoMMP.TemperatureScale.Fahrenheit);
| Int32 Opto22.OptoMMP3.OptoMMP.EnableBrainStreaming | ( | Boolean | bEnableStreaming | ) |
Controls the enable/disable functionality of brain streaming. Functionality only exists on Ethernet based I/O units.
This method didn't properly update the stream enabled flag.
| bEnableStreaming | true to enable stream. |
// to enable
Mmp.EnableBrainStreaming(true);
// to disable
Mmp.EnableBrainStreaming(true);
| void Opto22.OptoMMP3.OptoMMP.GetExtendedErrorInformation | ( | out String | strMessage, |
| out Boolean | bCommFault, | ||
| out Boolean | bProtocolFault, | ||
| out Boolean | bArgumentFault | ||
| ) |
Retrieves extended error information. This information is also logged in the computer's Application event log.
[KB 84294] Depending on the implementation of user code, GetExtendedErrorInformation() would cause a null exception. This is fixed in assembly version 3.0.2.0 and later.
| 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. |
|
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). |
| Int32 Opto22.OptoMMP3.OptoMMP.Open | ( | String | sHost, |
| Int32 | i32Port, | ||
| Connection | eType, | ||
| Int32 | i32InitialTimeoutMs, | ||
| Boolean | 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. |
| i32InitialTimeoutMs | Initial timeout (ms) for messaging transactions. 1000 ms is typical. |
| bPowerUpClear | Set this to "true." True clears the "Powered Up" flag on the brain. |
Int32 i32Result = Mmp.Open("172.22.1.2", 2001, OptoMMP.Connection.UdpIp, 1000, true);
| Int32 Opto22.OptoMMP3.OptoMMP.OpenSerialBinary | ( | String | sCommPort, |
| Int32 | i32BaudRate | ||
| ) |
Open a serial (binary) connection to a string of I/O units. The OptoMMP SDK uses only a Windows COM port. Your COM port may be an add-in card or a USB to Serial Converter (that emulates a COM port).
| sCommPort | Comm port string, a valid port such as COM1, COM3, or COM28. |
| i32BaudRate | Baud rate, once opened, cannot be changed. |
Int32 i32Result = Mmp.OpenSerialBinary("COM60", 115200);
| Int32 Opto22.OptoMMP3.OptoMMP.ReadAnalogEu512 | ( | Int32 | i32Point, |
| out Single | f32Value | ||
| ) |
Read a single Analog Engineering Unit Value. This method relies on the area "Analog EU or Digital Counter Packed Data -- Read."
May return a cached value.
| i32Point | Point number, range is 0 to 511. |
| f32Value | Parameter to store the point value. |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadAnalogEus512 | ( | Single[] | f32aryValues, |
| Int32 | i32StartIndex | ||
| ) |
Read all Analog States as Engineering Units. This method relies on the OptoMMP area "Analog EU or Digital Counter Packed Data -- Read."
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. |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadAnalogLoadCellConfiguration4096 | ( | Int32 | i32PointNumber, |
| out UInt32 | u32FastSettle, | ||
| out UInt32 | 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. |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadAnalogLoadCellConfiguration64 | ( | Int32 | i32PointNumber, |
| out UInt32 | u32FastSettle, | ||
| out UInt32 | 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. |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadAnalogPointConfiguration4096 | ( | Int32 | i32PointNumber, |
| out Int32 | i32PointType, | ||
| out Single | f32HighScale, | ||
| out Single | f32LowScale, | ||
| out Single | f32Offset, | ||
| out Single | f32Gain, | ||
| out Single | f32FilterWeight, | ||
| out Boolean | bEnableWatchdog, | ||
| out Single | f32WatchdogValue, | ||
| out String | sPointName, | ||
| out Single | f32LowerClamp, | ||
| out Single | f32UpperClamp | ||
| ) |
Read Analog Point configuration in 4,096 Point Area.
This area must be configured before points may be read in the 512-point area.
Useful for reading all configuration values of an analog point (input or output).
| i32PointNumber | Point Number, 0 to 511. |
| i32PointType | The point type. |
| f32HighScale | Upper Scale Value (when input is 100%). |
| f32LowScale | Lower Scale Value (when input is either 0% [unipolar] or -100% [bipolar]). |
| f32Offset | Offset. |
| f32Gain | Gain. |
| f32FilterWeight | Filter Weight (0.0 disables or positive values). |
| bEnableWatchdog | Enable analog communication watchdog. |
| f32WatchdogValue | The value to force whhen communication watchdog occurs. |
| sPointName | Name of the point. Maximum 50 characters. Additional characters will be truncated. |
| f32LowerClamp | Lower clamp of analog reading. |
| f32UpperClamp | Upper clamp of analog reading. |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadAnalogPointConfiguration64 | ( | Int32 | i32PointNumber, |
| out Int32 | i32ModuleType, | ||
| out Int32 | i32PointType, | ||
| out Single | f32HighScale, | ||
| out Single | f32LowScale, | ||
| out Single | f32Offset, | ||
| out Single | f32Gain, | ||
| out Single | f32FilterWeight, | ||
| out Boolean | bEnableWatchdog, | ||
| out Single | f32WatchdogValue, | ||
| out String | sPointName | ||
| ) |
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. |
| f32HighScale | 100% high-scale value. |
| f32LowScale | 0% (unipolar) or -100% (bipolar) low-scale value. |
| f32Offset | Calibration offset. |
| f32Gain | Calibration gain. |
| f32FilterWeight | Filter weight. |
| bEnableWatchdog | Watchdog enabled. |
| f32WatchdogValue | Watchdog value. |
| sPointName | Point name. |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadAnalogState4096 | ( | Int32 | i32Point4096Number, |
| AnalogReadOptions | eReadOption, | ||
| out Single | f32AnalogValue | ||
| ) |
Read an analog engineering units state, counts, or TPO values via a point number.
If Freshness is set to a non zero value, this method may returned a cached value.
Note, caching is configured when read adjacent values of the point, e.g. eu state, max, and min. If large blocks of analog points are going to be accessed consider either the 512 point methods or creating a custom data area.
[KB 84541] Assemblies 3.0.0.0 through 3.0.2.0 only read module 0, point 0 despite the value offered for i32Point4096Number.
| i32Point4096Number | Point number requested, range 0 to 4095. |
| eReadOption | Which attribute of the point to read. |
| f32AnalogValue | Current value of the analog input or output. |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadAnalogState64 | ( | Int32 | i32PointNumber, |
| out Single | f32AnalogValue | ||
| ) |
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. |
| f32AnalogValue | Current value of the analog input or output. |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadAnalogStates64 | ( | Single[] | f32aryData, |
| Int32 | 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.
| f32aryData | Single array to store the requested data. Must be preinitialized. |
| i32StartingIndex | Starting index to store this data. |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadBrainDiagnosticInformation | ( | out structBrainDiagnosticInformation | info | ) |
Read the diagnostic information of the brain. Added (April 4, 2011).
[KB 84295] In assembly version 3.0.0.0, a premature error could be returned as a result. The premature error was an invalid response when encountering I/O units that had different "status read areas." When encountering a missing status read area, a errant fault code was improperly returned.
| info | Parameter package read from the brain. |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadBrainStreamingConfiguration | ( | out Boolean | bIsEnabled, |
| out Int32 | i32IntervalMs, | ||
| out Int32 | i32UdpPortDestination, | ||
| out String[] | saryIpAddresses, | ||
| out UInt32 | u32OptoMMPAddress, | ||
| out Int32 | 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. |
| u32OptoMMPAddress | MMP address if not default stream. |
| i32LengthOfStream | Length of the MMP stream (if not default). |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadClearDigitalLatch64 | ( | Int32 | i32PointNumber, |
| Boolean | bOnLatch, | ||
| out Boolean | 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. |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadClearDigitalLatches64 | ( | Boolean | bReadAndClearLatches, |
| out Int64 | 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.
| bReadAndClearLatches | True, method reads and clears "on" latch. When False, reads and clears "off" latch. |
| i64LatchBitmask | A Int64 to store the latch state. Bit 0 is channel 0. |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadClearDigitalLatches64 | ( | Boolean | bOnLatches, |
| 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.
| bOnLatches | 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. |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadClearDigitalLatches64 | ( | Boolean | bOnLatches, |
| 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.
| bOnLatches | 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. |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadCustomConfiguration | ( | Int32 | i32StartIndex, |
| Int32 | i32Length, | ||
| UInt32[] | u32aryCustomAddresses, | ||
| Int32 | i32ArrayStartIndex | ||
| ) |
Read OptoMMP address configuration from the custom area.
| i32StartIndex | Starting index in the custom address area. Valid indexes are 0-1023. |
| i32Length | Amount of addresses to retrieve from I/O unit. Must be between 1 and 256 inclusive. |
| u32aryCustomAddresses | Array of OptoMMP addresses (lower 32-bits) as UInt32. |
| i32ArrayStartIndex | Start index of the array. |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadCustomData | ( | Int32 | i32StartIndex, |
| Int32 | i32Length, | ||
| UInt32[] | u32aryData, | ||
| Int32 | i32ArrayStartIndex | ||
| ) |
Read custom configured data from the custom data area. Data is always returned as UInt32.
| i32StartIndex | Starting index in the custom area, values 0 through 1023. |
| i32Length | Number of custom addresses, do not exceed 256. |
| u32aryData | Array of OptoMMP addresses. |
| i32ArrayStartIndex | Starting index in u32aryData. |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadDateTime | ( | out String | sDateTime | ) |
Read the Date and Time of the I/O Unit
| sDateTime | Date Time String from the I/O Unit |
// read date time
i32Result = Mmp.ReadDateTime(out sDateTime);
| Int32 Opto22.OptoMMP3.OptoMMP.ReadDigitalCountersStatus64 | ( | out Int64 | i64ActivateBitMask | ) |
Reads All 64 Counter Status.
This may returned cached values.
| i64ActivateBitMask | Status of the counters as a 64-bit mask. |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadDigitalCountersStatus64 | ( | Boolean[] | baryActive, |
| Int32 | 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. |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadDigitalCounterStatus64 | ( | Int32 | i32PointNumber, |
| out Boolean | 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. |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadDigitalLatch64 | ( | Int32 | i32PointNumber, |
| out Boolean | bOnLatch, | ||
| out Boolean | 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. |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadDigitalLatches64 | ( | out Int64 | i64OnLatchBitMask, |
| out Int64 | 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. |
| Int32 Opto22.OptoMMP3.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. |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadDigitalLatches64 | ( | Boolean[] | baryOnLatches, |
| 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. |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadDigitalPointConfiguration4096 | ( | Int32 | i32PointNumber, |
| out Int32 | i32ModuleType, | ||
| out Int32 | i32PointType, | ||
| out Int32 | i32Feature, | ||
| out Boolean | bWatchdogEnabled, | ||
| out Boolean | bWatchdogValue, | ||
| out String | sPointName | ||
| ) |
Read the Digital Point Configuration (4096 points).
| i32PointNumber | Point number, 0 to 4095. |
| 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. |
| sPointName | Point name. 50 characters maximum. |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadDigitalPointConfiguration64 | ( | Int32 | i32PointNumber, |
| out Int32 | i32ModuleType, | ||
| out Int32 | i32PointType, | ||
| out Int32 | i32Feature, | ||
| out Boolean | bWatchdogEnabled, | ||
| out Boolean | bWatchdogValue, | ||
| out String | sPointName | ||
| ) |
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. |
| sPointName | Point name. 15 characters maximum. |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadDigitalState64 | ( | Int32 | i32PointNumber, |
| out Boolean | 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." |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadDigitalStates64 | ( | out Int64 | 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. |
| Int32 Opto22.OptoMMP3.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. |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadDigitalStates64 | ( | Boolean[] | baryDigitalStates64, |
| Int32 | 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. |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadFOrCStatus | ( | out Boolean | bIsFahrenheit | ) |
Read the Temperature Reporting Status of the Brain
| bIsFahrenheit | An out value of true is Fahrenheit, false is Celsius |
// read the temperature status
i32Result = Mmp.ReadFOrCStatus(out bIsFahrenheit);
| Int32 Opto22.OptoMMP3.OptoMMP.ReadHighDensityDigitalCounter | ( | Int32 | i32Module, |
| Int32 | 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. |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadHighDensityDigitalLatch | ( | Int32 | i32Module, |
| Int32 | i32Channel, | ||
| out Boolean | bOnLatch, | ||
| out Boolean | 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. |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadHighDensityDigitalState | ( | Int32 | i32PointNumber, |
| out Boolean | 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. |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadHighDensityDigitalState | ( | Int32 | i32Module, |
| Int32 | i32Point, | ||
| out Boolean | bState | ||
| ) |
Read a high-density digital state from a module and point index.
This method may return a cached value.
| i32Module | Module number (index), values 0 through 15. |
| i32Point | Point number (index), values 0 through 63. |
| bState | State of the digital point. |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadHighDensityDigitalStates | ( | Boolean[] | baryStates, |
| Int32 | 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. |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadHighDensityDigitalStates | ( | UInt32[] | u32aryBitStates, |
| Int32 | 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. |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadInts | ( | Int64 | i64MmpAddress, |
| Int32 | i32Length, | ||
| Int32[] | i32aryInts, | ||
| Int32 | 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 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. |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadLongs | ( | Int64 | i64MmpAddress, |
| Int32 | i32Length, | ||
| Int64[] | i64aryLongs, | ||
| Int32 | 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 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(). The 4096 methods may be used to access these points on SNAP-PAC products.
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. The 3.x release of the SDK has additional 4096 point analog access methods.
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.
This method does not perform any operation.
|
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 an object using TCP/IP, close the OptoMMP object.
When using serial or UDP/IP, back-off for a communication timeout period before resuming communications. These communication methods do not require the application to close the communication channel.
This method does not perform any operation.
| Int32 Opto22.OptoMMP3.OptoMMP.ReadOptionallyClearAnalogMaxMin4096 | ( | Int32 | i32Point4096Number, |
| Boolean | bClear, | ||
| out Single | f32Maximum, | ||
| out Single | f32Minimum | ||
| ) |
Read and clear analog maximum and minimum value of a point on a 4096-point rack.
[KB 84543] Issue when using assemblies 3.0.0.0 through 3.0.2.0 on x86 and AMD64 (Intel and AMD) processor architectures. Invalid floating point results would occur.
| i32Point4096Number | Point number (0 through 4095) |
| bClear | When true, resets the maximum and minimum value after being read. |
| f32Maximum | Maximum value read. |
| f32Minimum | Minimum value read. |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadOptionallyClearAnalogMaxMin64 | ( | Int32 | i32PointNumber, |
| Boolean | 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. |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadOptionallyClearCounter64 | ( | Int32 | i32PointNumber, |
| Boolean | 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. |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadOptionallyClearCounters64 | ( | Boolean | bClear, |
| UInt32[] | u32aryCounters, | ||
| Int32 | 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. |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadOptionallyClearHighDensityDigitalCounters32 | ( | Boolean | bClear, |
| UInt32[] | u32aryCounters, | ||
| Int32 | 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. |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadOptionallyClearHighDensityDigitalLatches | ( | Boolean | bClear, |
| Boolean[] | baryOnLatches, | ||
| Boolean[] | baryOffLatches, | ||
| Int32 | 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. May return a cached value. |
| baryOnLatches | Array to store on-latch states. |
| baryOffLatches | Array to store off-latch states. |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadOptionallyClearHighDensityDigitalLatches | ( | Boolean | bClear, |
| UInt32[] | u32aryOnLatches, | ||
| UInt32[] | u32aryOffLatches, | ||
| Int32 | 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. |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadOptionallyClearHighDensityDigitalLatches | ( | Int32 | i32StartModule, |
| Int32 | i32EndModule, | ||
| Boolean | bClear, | ||
| Boolean[] | baryOnLatches, | ||
| Boolean[] | baryOffLatches, | ||
| Int32 | 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 Opto22.OptoMMP3.OptoMMP.ReadPacSBCommunicationBlinkCodeFlag | ( | out Boolean | bEnabled | ) |
Read the SNAP-PAC-SB communication blink code flag status.
| bEnabled | True, feature enabled, false feature disabled. |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadPid | ( | Int32 | i32PidIndex, |
| out 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 Opto22.OptoMMP3.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 Opto22.OptoMMP3.OptoMMP.ReadPointName4096 | ( | Int32 | i32PointNumber, |
| out String | sPointName | ||
| ) |
Read the Analog or Digital Point Name, using the 4096-point memory model. SNAP-PAC units only.
| i32PointNumber | Point number to retrieve the point name from. |
| sPointName | Point name to store the point name retrieved. |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadPointName64 | ( | Int32 | i32PointNumber, |
| out String | sPointName | ||
| ) |
Read the Analog or Digital Point Name, using the 64-point memory model. SNAP-PAC and Legacy Ethernet based I/O units that support a point name.
| i32PointNumber | Point number to retrieve the point name from. |
| sPointName | Point name to store the point name retrieved. |
| Int32 Opto22.OptoMMP3.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 | Digital output index. |
| f32OnTime | Pulse on-time in seconds. |
| f32OffTime | Pulse off-time in seconds. |
| Int32 Opto22.OptoMMP3.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 digital output used. |
| f32Percent | Current percentage set for the pulse object. |
| Int32 Opto22.OptoMMP3.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 digital output used. |
| f32Period | Pulse period in seconds. |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadScannerFlags | ( | out Int32 | i32ScannerFlags | ) |
Read the scanner flags of the control engine.
| i32ScannerFlags | Out parameter when the return value is okay. Bit compressed value of the scanner flags. |
i32Result = Mmp.ReadScannerFlags(out i32ScannerFlags);
| Int32 Opto22.OptoMMP3.OptoMMP.ReadSerialModuleConfiguration | ( | Int32 | i32PortNumber, |
| out Int32 | i32TcpPort, | ||
| out Int32 | i32BaudRate, | ||
| out SerialParity | eParity, | ||
| out Byte | byDataBits, | ||
| out Byte | byStopBits, | ||
| out Boolean | bHardwareFlowControl, | ||
| out Boolean | bTestMessage, | ||
| out Int32 | i32Eom, | ||
| out Boolean | b4WireMode | ||
| ) |
Read the Serial (Module) Port Configuration. Only for Module based Serial Ports. Only supported on Ethernet based brains and controllers.
In assembly of 3.0 or later, i32Eom and b4WireMode will correctly report.
| 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). |
i32Result = Mmp2.ReadSerialModuleConfiguration(OptoMMP.GetSerialOrSsiPortIndexFromModuleAndChannel(15,1),
out i32TcpPort, out i32BaudRate, out eParity,
out byDataBits, out byStopBits, out bHardwareFlowcontrol, out bTestMessage,
out i32Eom, out b4WireMode);
if (i32Result < 0)
{
Console.WriteLine("ReadSerialModuleConfiguration failed result {0}", i32Result);
exit;
}
String sOutput = "Port Number " + i32SerialPortIndex.ToString() + "\n" +
"TcpPort " + i32TcpPort.ToString() + "\n" +
"BaudRate " + i32BaudRate.ToString() + "\n" +
"Parity " + eParity.ToString() + "\n" +
"Data Bits " + byDataBits.ToString() + "\n" +
"Stop Bits " + byStopBits.ToString() + "\n" +
"Hardware Flow Control " + bHardwareFlowcontrol.ToString() + "\n" +
"Test Message " + bTestMessage.ToString() + "\n" +
"EOM 0x" + i32Eom.ToString("X08") + "\n" +
"4-wire " + b4WireMode.ToString() + "\n";
Console.WriteLine(sOutput);
| Int32 Opto22.OptoMMP3.OptoMMP.ReadSingles | ( | Int64 | i64MmpAddress, |
| Int32 | i32Length, | ||
| Single[] | f32arySingles, | ||
| Int32 | i32StartingIndex | ||
| ) |
Read a block of Singles from the Opto MMP Device.
There are many areas this toolkit does not support with a 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. |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadSsiModuleConfiguration | ( | Int32 | i32PortNumber, |
| out Int32 | i32FrameSize, | ||
| out Single | f32ClockSpeedkHz, | ||
| out Single | f32InterFrameTimeUs, | ||
| out Int32 | i32MsbOffset, | ||
| out Int32 | i32DataBits, | ||
| out Int32 | i32ErrorBitOffset, | ||
| out Boolean | bErrorBitLowIsError, | ||
| out eDataCode | eCoding, | ||
| out Boolean | 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. |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadSteinhartHart4096 | ( | Int32 | i32PointNumber4096, |
| out Single | f32CoefA, | ||
| out Single | f32CoefB, | ||
| out Single | f32CoefC, | ||
| out Single | f32CoefSecond | ||
| ) |
Read the Steinhart-Hart linearization coefficients for the specified input. Requires R9.3e firmware or later.
Uses the following equation:
Temperature (Kelvin) = 1.0 / (f32CoefA + f32CoefB * ln(Ohms) + f32CoefSecond * (ln(Ohms)^2) + f32CoefC * (ln(Ohms)^3))
| i32PointNumber4096 | Point index in the 4096 configuration area, values 0 through 4095 Inclusive. GetPointNumberFor4096() may be used. |
| f32CoefA | Coefficient A. |
| f32CoefB | Coefficient B. |
| f32CoefC | Coefficient C. |
| f32CoefSecond | Second order coefficient. |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadUints | ( | Int64 | i64MmpAddress, |
| Int32 | i32Length, | ||
| UInt32[] | u32aryInts, | ||
| Int32 | i32StartingIndex | ||
| ) |
Read a block of unsigned integers (32-bit unsigned values) from the Memory Map
There are many areas this toolkit does not support with a 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 unsigned integer values to read. |
| u32aryInts | Array of 32-bit unsigned integers. |
| i32StartingIndex | Starting index of the 32-bit unsigned integer array to store values. |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadULongs | ( | Int64 | i64MmpAddress, |
| Int32 | i32Length, | ||
| UInt64[] | u64aryLongs, | ||
| Int32 | i32StartingIndex | ||
| ) |
Read a block of unsigned longs (64-bit unsigned 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 unsigned UInt64s to read. |
| u64aryLongs | Array of unsigned UInt64s to read. |
| i32StartingIndex | Starting index of u64aryLongs to read too. |
| Int32 Opto22.OptoMMP3.OptoMMP.ReadWatchdogTime | ( | out Int32 | i32WatchdogTimeMs | ) |
Read the Device's Communication Watchdog Timeout
| i32WatchdogTimeMs | [out] The timeout currently set at the IO unit. 0 is disabled. |
// read watchdog time
i32Result = Mmp.ReadWatchdogTime(out i32WatchdogTimeMs);
| Int32 Opto22.OptoMMP3.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. |
| Int32 Opto22.OptoMMP3.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. |
| Int32 Opto22.OptoMMP3.OptoMMP.ScratchpadBitsRead | ( | Boolean[] | baryScratchpad, |
| Int32 | 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. |
| Int32 Opto22.OptoMMP3.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. |
| Int32 Opto22.OptoMMP3.OptoMMP.ScratchpadBitsWrite | ( | Boolean[] | baryOnStates, |
| Boolean[] | baryOffStates, | ||
| Int32 | 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. |
| Int32 Opto22.OptoMMP3.OptoMMP.ScratchpadBitWrite | ( | Boolean | bState, |
| Int32 | i32Index | ||
| ) |
Write Scratchpad Bit
| bState | Boolean. |
| i32Index | Bit index, values 0 to 63. |
| Int32 Opto22.OptoMMP3.OptoMMP.ScratchPadF32NumberofElements | ( | ) |
Maximum number of elements in the Float Scratchpad Array.
| Int32 Opto22.OptoMMP3.OptoMMP.ScratchpadFloatRead | ( | Single[] | fary, |
| Int32 | i32StartFaryIndex, | ||
| Int32 | i32Length, | ||
| Int32 | 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. |
| Int32 Opto22.OptoMMP3.OptoMMP.ScratchpadFloatWrite | ( | Single[] | fary, |
| Int32 | i32StartFaryIndex, | ||
| Int32 | i32Length, | ||
| Int32 | 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. |
| Int32 Opto22.OptoMMP3.OptoMMP.ScratchPadI32NumberofElements | ( | ) |
Maximum number of elements in the 32-bit Integer Scratchpad Array.
| Int32 Opto22.OptoMMP3.OptoMMP.ScratchpadI32Read | ( | Int32[] | i32ary, |
| Int32 | i32StartIaryIndex, | ||
| Int32 | i32Length, | ||
| Int32 | 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. |
| Int32 Opto22.OptoMMP3.OptoMMP.ScratchpadI32Write | ( | Int32[] | i32ary, |
| Int32 | i32StartIaryIndex, | ||
| Int32 | i32Length, | ||
| Int32 | 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. |
| Int32 Opto22.OptoMMP3.OptoMMP.ScratchPadI64NumberofElements | ( | ) |
Maximum number of elements in the 64-bit Integer Scratchpad Array.
| Int32 Opto22.OptoMMP3.OptoMMP.ScratchpadI64Read | ( | Int64[] | i64ary, |
| Int32 | i32StartIaryIndex, | ||
| Int32 | i32Length, | ||
| Int32 | i32StartScratchpadStartIndex | ||
| ) |
Read the 64-bit signed-integer (Int64) 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. |
| Int32 Opto22.OptoMMP3.OptoMMP.ScratchpadI64Write | ( | Int64[] | i64ary, |
| Int32 | i32StartIaryIndex, | ||
| Int32 | i32Length, | ||
| Int32 | 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. |
| Int32 Opto22.OptoMMP3.OptoMMP.ScratchPadStringNumberofElements | ( | ) |
Maximum number of elements in the String Scratchpad Array.
| Int32 Opto22.OptoMMP3.OptoMMP.ScratchpadStringRead | ( | String[] | strary, |
| Int32 | i32StartStraryIndex, | ||
| Int32 | i32Length, | ||
| Int32 | 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. |
| Int32 Opto22.OptoMMP3.OptoMMP.ScratchpadStringWrite | ( | String[] | strary, |
| Int32 | i32StartStraryIndex, | ||
| Int32 | i32Length, | ||
| Int32 | 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. |
|
static |
Converts a UInt32 (in binary form as a single) to a single.
| f32Data | Single data to convert. |
| Int32 Opto22.OptoMMP3.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 Opto22.OptoMMP3.OptoMMP.StopPulse | ( | IoModel | eIoModelOfPointIndex, |
| Int32 | i32PointIndex64or512, | ||
| Boolean | bTurnOn | ||
| ) |
Stop a pulse. Note, writing a digital 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. |
|
static |
Converts a Single (in binary form) to a UInt32.
| u32Data | UInt32 data to convert to single. |
| Int32 Opto22.OptoMMP3.OptoMMP.WriteAnalogEu512 | ( | Int32 | 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. |
| Int32 Opto22.OptoMMP3.OptoMMP.WriteAnalogLoadCellConfiguration4096 | ( | Int32 | i32PointNumber, |
| UInt32 | u32FastSettle, | ||
| UInt32 | 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. |
| Int32 Opto22.OptoMMP3.OptoMMP.WriteAnalogLoadCellConfiguration64 | ( | Int32 | i32PointNumber, |
| UInt32 | u32FastSettle, | ||
| UInt32 | 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). |
| Int32 Opto22.OptoMMP3.OptoMMP.WriteAnalogPointConfiguration4096 | ( | Int32 | i32PointNumber, |
| Int32 | i32PointType, | ||
| Single | f32HighScale, | ||
| Single | f32LowScale, | ||
| Single | f32Offset, | ||
| Single | f32Gain, | ||
| Single | f32FilterWeight, | ||
| Boolean | bEnableWatchdog, | ||
| Single | f32WatchdogValue, | ||
| String | sPointName, | ||
| Single | f32LowerClamp, | ||
| Single | f32UpperClamp | ||
| ) |
Write Analog Point configuration in 4,096 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. |
| f32HighScale | Upper Scale Value (when input is 100%). |
| f32LowScale | Lower Scale Value (when input is either 0% [unipolar] or -100% [bipolar]). |
| f32Offset | Offset. |
| f32Gain | Gain. |
| f32FilterWeight | Filter Weight (0.0 disables or positive values). |
| bEnableWatchdog | Enable analog communication watchdog. |
| f32WatchdogValue | The value to force whhen communication watchdog occurs. |
| sPointName | Name of the point. Maximum 50 characters. Additional characters will be truncated. |
| f32LowerClamp | Lower analog clamp value. |
| f32UpperClamp | Upper analog clamp value. |
| Int32 Opto22.OptoMMP3.OptoMMP.WriteAnalogPointConfiguration4096 | ( | Int32 | i32PointNumber4096, |
| Int32 | i32PointType, | ||
| Single | f32HighScale, | ||
| Single | f32LowScale, | ||
| Single | f32FilterWeight, | ||
| Boolean | bEnableWatchdog, | ||
| Single | f32WatchdogValue, | ||
| String | sPointName, | ||
| Single | f32LowerClamp, | ||
| Single | f32UpperClamp | ||
| ) |
Write Analog Point configuration in 4,096 Point Area. Useful when offset and gain parameters are not required.
This area must be configured before points may be read in the 512-point area.
Caution, prior set parameters such as offset and gain are not modified with this command.
| i32PointNumber4096 | Point Number, 0 to 511. |
| i32PointType | The point type. |
| f32HighScale | Upper Scale Value (when input is 100%). |
| f32LowScale | Lower Scale Value (when input is either 0% [unipolar] or -100% [bipolar]). |
| f32FilterWeight | Filter Weight (0.0 disables or positive values). |
| bEnableWatchdog | Enable analog communication watchdog. |
| f32WatchdogValue | The value to force whhen communication watchdog occurs. |
| sPointName | Name of the point. Maximum 50 characters. Additional characters will be truncated. |
| f32LowerClamp | Lower analog clamp value. |
| f32UpperClamp | Upper analog clamp value. |
| Int32 Opto22.OptoMMP3.OptoMMP.WriteAnalogPointConfiguration4096 | ( | Int32 | i32PointNumber4096, |
| Int32 | i32PointType, | ||
| Single | f32FilterWeight, | ||
| Boolean | bEnableWatchdog, | ||
| Single | f32WatchdogValue, | ||
| String | sPointName, | ||
| Single | f32LowerClamp, | ||
| Single | f32UpperClamp | ||
| ) |
Write Analog Point configuration in 4,096 Point Area. Useful for thermocouple and RTD probes or analog input ranges.
This area must be configured before points may be properly read.
Caution, prior set parameters such as analog point feature, offset, gain, high-scale and low-scale are not modified with this command.
| i32PointNumber4096 | Point Number, 0 to 511. |
| i32PointType | The point type. |
| f32FilterWeight | Filter Weight (0.0 disables or positive values). |
| bEnableWatchdog | Enable analog communication watchdog. |
| f32WatchdogValue | The value to force whhen communication watchdog occurs. |
| sPointName | Name of the point. Maximum 50 characters. Additional characters will be truncated. |
| f32LowerClamp | Lower analog clamp value. |
| f32UpperClamp | Upper analog clamp value. |
| Int32 Opto22.OptoMMP3.OptoMMP.WriteAnalogPointConfiguration4096 | ( | Int32 | i32PointNumber4096, |
| Int32 | i32PointType, | ||
| String | sPointName | ||
| ) |
Write Analog Point configuration in 4,096 Point Area. Useful for RTDs and thermocouple modules, to just set the "probe" type or analog input ranges.
This area must be configured before points may be properly read in the 512-point or 4096-point areas.
Caution, prior set parameters such as analog point feature, offset, gain, high-scale, low-scale, filter weight, watchdog value, watchdog enabled, upper clamp and lower clamp are not modified with this command.
| i32PointNumber4096 | Point Number, 0 to 4095. May use GetPointNumberFor4096() to help. |
| i32PointType | The point type. |
| sPointName | Name of the point. Maximum 50 characters. Additional characters will be truncated. |
| Int32 Opto22.OptoMMP3.OptoMMP.WriteAnalogPointConfiguration4096 | ( | Int32 | i32PointNumber, |
| Int32 | i32PointType | ||
| ) |
Write Point configuration in 4,096 Point Area. Useful for setting probe types such as thermocouples and RTDs. Will also set the analog input ranges for voltage input modules.
This area must be configured before points may be properly read.
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).
Due to the large variety of point type values that overlap, an enumeration is not available. Please see Opto 22 Form 1465 for point type specific information.
Caution, prior set parameters such as analog point feature, offset, gain, high-scale, low-scale, filter weight, watchdog value, watchdog enable, point name, upper clamp and lower clamp are not modified with this command.
| i32PointNumber | Point Number, 0 to 4095. |
| i32PointType | The point type. |
// set a J thermocouple for a SNAP-AITM-8 in position 5, channel #7 (starting from zero).
i32Result = Mmp.WriteAnalogPointConfiguration4096(OptoMMP.GetPointNumberFor4096(5, 7), 5);
| Int32 Opto22.OptoMMP3.OptoMMP.WriteAnalogPointConfiguration64 | ( | Int32 | i32PointNumber, |
| Int32 | i32PointType, | ||
| Single | f32HighScale, | ||
| Single | f32LowScale, | ||
| Single | f32Offset, | ||
| Single | f32Gain, | ||
| Single | f32FilterWeight, | ||
| Boolean | bEnableWatchdog, | ||
| Single | f32WatchdogValue, | ||
| String | sPointName | ||
| ) |
Write Analog Point configuration in 64 Point Area.
configures all the basic analog point configuration values.
[KB 84529] Fixed exception fault in assembly version 3.0.0.x.
| i32PointNumber | Point Number, 0 to 63. |
| i32PointType | The point type. |
| f32HighScale | Upper Scale Value (when input is 100%). |
| f32LowScale | Lower Scale Value (when input is either 0% [unipolar] or -100% [bipolar]). |
| f32Offset | Offset. |
| f32Gain | Gain. |
| f32FilterWeight | Filter Weight (0.0 disables or positive values). |
| bEnableWatchdog | Enable analog communication watchdog. |
| f32WatchdogValue | The value to force whhen communication watchdog occurs. |
| sPointName | Point name, 15 characters maximum, additional length is truncated. |
| Int32 Opto22.OptoMMP3.OptoMMP.WriteAnalogState4096 | ( | Int32 | i32Point4096Number, |
| AnalogWriteOptions | eOption, | ||
| Single | f32WriteValue | ||
| ) |
Sets a single analog state in engineering units, Counts or TPO values in the 4096-point IO unit memory map.
[KB 84543] This method is deprecated. Use WriteAnalogState4096v2() instead.
| i32Point4096Number | The point number to write, 0 to 4095. |
| eOption | The enumeration of the value option to be written. |
| f32WriteValue | The value to write. |
| Int32 Opto22.OptoMMP3.OptoMMP.WriteAnalogState4096v2 | ( | Int32 | i32Point4096Number, |
| AnalogWriteOptions4096 | eOption, | ||
| Single | f32WriteValue | ||
| ) |
Sets a single analog state in engineering units, Counts or TPO values in the 4096-point IO unit memory map.
This method does not cache values.
[KB 84542] Method added to support new enumeration.
| i32Point4096Number | The point number to write, 0 to 4095. |
| eOption | The enumeration of the value option to be written. |
| f32WriteValue | The value to write. |
| Int32 Opto22.OptoMMP3.OptoMMP.WriteAnalogState64 | ( | Int32 | i32PointNumber, |
| AnalogWriteOptions | eOption, | ||
| Single | fWriteValue | ||
| ) |
Sets a Single Analog State in Engineering Units, Counts or TPO 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. |
| Int32 Opto22.OptoMMP3.OptoMMP.WriteAnalogStates64 | ( | Single[] | f32aryValues, |
| Boolean | bEngineeringUnits, | ||
| Int32 | i32StartIndex | ||
| ) |
Set analog outputs in engineering units or counts as a 64-point bank write.
| f32aryValues | 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. |
| Int32 Opto22.OptoMMP3.OptoMMP.WriteBrainStreamingConfiguration | ( | Int32 | i32IntervalMs, |
| Int32 | i32UdpPortDestination, | ||
| String[] | saryIpAddresses, | ||
| UInt32 | u32OptoMMPAddress, | ||
| Int32 | 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. Ensure the IP Addresses are packed from low to high indexes. When the device enounters a zero IP address, it will stop transmitting to any more IP addresses. |
| u32OptoMMPAddress | If not default, the OptoMMP address to use. |
| i32LengthOfStream | Length of the non-default OptoMMP area to use. |
Int32 i32IntervalMs = 500;
Int32 i32MyPcUdpPortReceivePort = 5001;
String[] saryIpAddresses = {sMyPcIpAddress};
Int64 i64OptoMMPAddress = 0;
Int32 i32LengthOfStream = 0;
i32Result = Mmp.WriteBrainStreamingConfiguration(i32IntervalMs, i32MyPcUdpPortReceivePort, saryIpAddresses, i64OptoMMPAddress, i32LengthOfStream);
if (i32Result < 0)
{
Console.WriteLine("Configuring stream on device failed");
}
| Int32 Opto22.OptoMMP3.OptoMMP.WriteCustomConfiguration | ( | Int32 | i32StartIndex, |
| Int32 | i32Length, | ||
| UInt32[] | u32aryCustomAddresses, | ||
| Int32 | i32ArrayStartIndex | ||
| ) |
Write custom configuration addresses to the OptoMMP "custom area."
| i32StartIndex | Starting index in the custom area, values 0 through 1023. |
| i32Length | Length of data to write. |
| u32aryCustomAddresses | Addresses to write to the device. |
| i32ArrayStartIndex | Starting index in the |
| Int32 Opto22.OptoMMP3.OptoMMP.WriteCustomData | ( | Int32 | i32StartIndex, |
| Int32 | i32Length, | ||
| UInt32[] | u32aryData, | ||
| Int32 | i32ArrayStartIndex | ||
| ) |
Write data to the custom area.
| i32StartIndex | Start index in the custom area. Valid values from 0 to 1023. |
| i32Length | Length of data (32-bit values) to write. |
| u32aryData | Array of data to write. |
| i32ArrayStartIndex | Start index in the data array to write. |
| Int32 Opto22.OptoMMP3.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. |
String sForceTime = "2009-12-08 12:01:01.00";
i32Result = Mmp.WriteDateTime(sForceTime);
| Int32 Opto22.OptoMMP3.OptoMMP.WriteDigitalEnableorDisableCounter64 | ( | Int32 | i32PointNumber, |
| Boolean | 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. |
| Int32 Opto22.OptoMMP3.OptoMMP.WriteDigitalEnableorDisableCounters64 | ( | Int64 | i64ActivateBitMask, |
| Int64 | 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. |
| Int32 Opto22.OptoMMP3.OptoMMP.WriteDigitalEnableorDisableCounters64 | ( | Boolean[] | baryActivate, |
| Boolean[] | baryDeactivate, | ||
| Int32 | 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. |
| Int32 Opto22.OptoMMP3.OptoMMP.WriteDigitalPointConfiguration4096 | ( | Int32 | i32PointNumber, |
| Boolean | bOutput, | ||
| eDigitalFeature | eFeature, | ||
| Boolean | bEnableWatchdog, | ||
| Boolean | bWatchdogValue, | ||
| String | sPointName | ||
| ) |
Write the digital point configuration (4096 points).
| i32PointNumber | Point Number 0 to 4095. |
| 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". |
| sPointName | Point name. Up to 50 characters in length. Additional length is truncated. |
| Int32 Opto22.OptoMMP3.OptoMMP.WriteDigitalPointConfiguration64 | ( | Int32 | i32PointNumber, |
| Boolean | bOutput, | ||
| eDigitalFeature | eFeature, | ||
| Boolean | bEnableWatchdog, | ||
| Boolean | bWatchdogValue, | ||
| String | sPointName | ||
| ) |
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". |
| sPointName | Point name. Up to 15 characters in length. Additional length is truncated. |
// configure a digital point as input, with no digital features with a point name of "diPoint_00_00".
i32Result = Mmp.WriteDigitalPointConfiguration64(OptoMMP.GetPointNumberFor64(0, 0), false, OptoMMP.eDigitalFeature.None, false, false, "diPoint_00_00");
| Int32 Opto22.OptoMMP3.OptoMMP.WriteDigitalState64 | ( | Int32 | i32PointNumber, |
| Boolean | 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. |
| Int32 Opto22.OptoMMP3.OptoMMP.WriteDigitalStates64 | ( | Int64 | 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. |
| Int32 Opto22.OptoMMP3.OptoMMP.WriteDigitalStates64 | ( | Boolean[] | baryStates, |
| Int32 | 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. |
| Int32 Opto22.OptoMMP3.OptoMMP.WriteDigitalStatesMoMo64 | ( | Int64 | i64OnMask, |
| Int64 | 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. |
| Int32 Opto22.OptoMMP3.OptoMMP.WriteDigitalStatesMoMo64 | ( | Boolean[] | baryOnStates, |
| Boolean[] | baryOffStates, | ||
| Int32 | 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. |
| Int32 Opto22.OptoMMP3.OptoMMP.WriteFOrCStatus | ( | Boolean | 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. |
// set temperature mode to Celsius
i32Result = Mmp.WriteFOrCStatus(false);
| Int32 Opto22.OptoMMP3.OptoMMP.WriteHighDensityDigitalModule | ( | Int32 | i32Module, |
| Boolean[] | baryOnState, | ||
| Boolean[] | baryOffState | ||
| ) |
Update High-Density Digital States of a Single Module Using Boolean Arrays.
| i32Module | Module number (index) on rack. Values from 0 to 15. |
| baryOnState | Array of "on" states to write. True turns on. Array index 0 cooresponds to point 0. Array length must be at least 64 elements. |
| baryOffState | Array of "off" states to write. True turns off. Array index 0 cooresponds to point 0. Array length must be at least 64 elements. |
| Int32 Opto22.OptoMMP3.OptoMMP.WriteHighDensityDigitalModule | ( | Int32 | i32Module, |
| UInt64 | u64OnStateMask, | ||
| UInt64 | u64OffStateMask | ||
| ) |
Update High-Density Digital States of a Single Module Using UInt64 Bitmasks.
| i32Module | Module number (index) on rack. Values from 0 to 15. |
| u64OnStateMask | Bitmask of "on" states to write. True turns on. Bit 0 cooresponds to point 0. |
| u64OffStateMask | Bitmask of "off" states to write. True turns off. Bit 0 cooresponds to point 0. |
| Int32 Opto22.OptoMMP3.OptoMMP.WriteHighDensityDigitalState | ( | Int32 | i32Module, |
| Int32 | i32Point, | ||
| Boolean | bState | ||
| ) |
Write An Individual High-Density Digital State
| i32Module | Module number (index) on rack. Values from 0 to 15. |
| i32Point | Point index. Values from 0 to 63. At the time of this SDK publication, high density modules contain up to 32 points. |
| bState | Discrete state to write. True turns on, false turns off. All other points of the module are unaffected. |
| Int32 Opto22.OptoMMP3.OptoMMP.WriteHighDensityDigitalStates | ( | Int32 | i32StartModule, |
| Int32 | i32EndModule, | ||
| Boolean[] | baryStates, | ||
| Int32 | 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. |
| Int32 Opto22.OptoMMP3.OptoMMP.WriteHighDensityDigitalStates | ( | Int32 | i32StartModule, |
| Int32 | i32EndModule, | ||
| Int32[] | i32aryStates, | ||
| Int32 | 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. |
| Int32 Opto22.OptoMMP3.OptoMMP.WriteInts | ( | Int64 | i64MmpAddress, |
| Int32 | i32Length, | ||
| Int32[] | i32aryInts, | ||
| Int32 | 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 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. |
| Int32 Opto22.OptoMMP3.OptoMMP.WriteLocalDateTime | ( | ) |
Write Local Date-Time To The IO Unit.
The PC's local date-time will be written to the I/O unit.
// write the local date time to device
i32Result = Mmp.WriteLocalDateTime();
| Int32 Opto22.OptoMMP3.OptoMMP.WriteLongs | ( | Int64 | i64MmpAddress, |
| Int32 | i32Length, | ||
| Int64[] | i64aryLongs, | ||
| Int32 | 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 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 Opto22.OptoMMP3.OptoMMP.WritePacSBCommunicationBlinkCodeFlag | ( | Boolean | bEnable | ) |
Enable/Disable SNAP-PAC-SB communication blink code. This method enables a feature on the SNAP-PAC-SB to red blink the STAT indicator when a detected message exception occurs.
Blink Code (2) Received packet CRC error. Blink Code (3) Undefined packet type. Blink Code (4) Malformed packet.
| bEnable | True, enables feature, false disables feature. |
| Int32 Opto22.OptoMMP3.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. |
| Int32 Opto22.OptoMMP3.OptoMMP.WritePointConfiguration64 | ( | Int32 | i32PointNumber, |
| Int32 | i32PointType | ||
| ) |
Write/Modify Analog Point configuration or Digital Feature 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 Opto22.OptoMMP3.OptoMMP.WritePointName4096 | ( | Int32 | i32PointNumber, |
| String | sPointName | ||
| ) |
Write the Analog or Digital Point Name, using the 4096-point memory model. SNAP-PAC units only.
| i32PointNumber | Point number to write the point name to. Values 0 through 63 inclusive, are valid. |
| sPointName | Point name to write, 50 characters maximum. Name will be truncated if longer. |
| Int32 Opto22.OptoMMP3.OptoMMP.WritePointName64 | ( | Int32 | i32PointNumber, |
| String | sPointName | ||
| ) |
Write the Analog or Digital Point Name, using the 64-point memory model. SNAP-PAC and Legacy Ethernet based I/O units that support a point name.
| i32PointNumber | Point number to write the point name to. Values 0 through 63 inclusive, are valid. |
| sPointName | Point name to write, 15 characters maximum. Name will be truncated if longer. |
| Int32 Opto22.OptoMMP3.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 | Digital output index. |
| f32OnTime | New on-time value in seconds. |
| f32OffTime | New off-time value in seconds. |
| Int32 Opto22.OptoMMP3.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 digital output used. |
| f32Percent | Percentage to set the continuous pulse train. |
| Int32 Opto22.OptoMMP3.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 digital output used. |
| f32Period | Pulse period in seconds. |
| Int32 Opto22.OptoMMP3.OptoMMP.WriteScannerFlags | ( | Int32 | 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.
| i32ScannerFlags | Bit packed array to write to location. |
i32Result = Mmp.WriteScannerFlags(0x0007);
| Int32 Opto22.OptoMMP3.OptoMMP.WriteSerialModuleConfiguration | ( | Int32 | i32PortNumber, |
| Int32 | i32TcpPort, | ||
| Int32 | i32BaudRate, | ||
| SerialParity | eParity, | ||
| Byte | byDataBits, | ||
| Byte | byStopBits, | ||
| Boolean | bHardwareFlowControl, | ||
| Boolean | bTestMessage, | ||
| Int32 | i32Eom, | ||
| Boolean | b4WireMode | ||
| ) |
Write the Serial Port Configuration. Only for Module based Serial Ports. Only supported on Ethernet based brains and controllers.
| i32PortNumber | Serial port number to write too, values 0 through 31. See GetSerialOrSsiPortIndexFromModuleAndChannel(). |
| i32TcpPort | TCP/IP Service port this serial port is associated too. This is a read-only parameter at the I/O unit. |
| 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). |
Int32 i32PortNumber = OptoMMP.GetSerialOrSsiPortIndexFromModuleAndChannel(15,1);
Int32 i32TcpPort = 22530;
Int32 i32BaudRate = 115200;
OptoMMP.SerialParity eParity = OptoMMP.SerialParity.None;
Byte byDataBits = 8;
Byte byStopBits = 1;
Boolean bHardwareFlowcontrol = true;
Boolean bTestMessage = false;
Int32 i32Eom = 0x01020304;
Boolean b4WireMode = true;
i32Result = Mmp2.WriteSerialModuleConfiguration(i32PortNumber, i32TcpPort, i32BaudRate, eParity,
byDataBits, byStopBits, bHardwareFlowcontrol, bTestMessage,
i32Eom, b4WireMode);
| Int32 Opto22.OptoMMP3.OptoMMP.WriteSingles | ( | Int64 | i64MmpAddress, |
| Int32 | i32Length, | ||
| Single[] | f32arySingles, | ||
| Int32 | i32StartingIndex | ||
| ) |
Write a block of Singles to the Opto MMP Device.
There are many areas this toolkit does not support with a 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. |
| Int32 Opto22.OptoMMP3.OptoMMP.WriteSsiModuleConfiguration | ( | Int32 | i32PortNumber, |
| Int32 | i32FrameSize, | ||
| Single | f32ClockSpeedkHz, | ||
| float | f32InterFrameTimeUs, | ||
| Int32 | i32MsbOffset, | ||
| Int32 | i32DataBits, | ||
| Int32 | i32ErrorBitOffset, | ||
| Boolean | bErrorBitLowIsError, | ||
| eDataCode | eCoding, | ||
| Boolean | 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. |
| Int32 Opto22.OptoMMP3.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") Should a different command be needed that is not in the StatusWriteCommand enumeration, directly write the numeric value to 0xffff f038 0000.
When using enumerations ResetHardware or ResetToDefaults, the device will physically reboot. If you are using a TCPIP connection, the connection will be severed, close this session after this method returns. Depending on the network connection, the network link and device may not be available to reconnect for as much as 30 seconds.
Using enumerations that cause the device to reboot may cause this error to appear in the Windows Application Event Queue. 'Timeout, no data was received. Either the remote host didn't receive the request or a packet was dropped. Issuing a command to reset to defaults and reboot or reboot device may cause this message to occur.' This is expected behavior.
Some commands like StoreToFlash and EraseFlash will take up to 5 seconds to complete. Update the timeout accordingly.
// erase the stored device configuration and reset device
Mmp.WriteStatusCommand(OptoMMP.StatusWriteCommand.ResetToDefaults);
| Int32 Opto22.OptoMMP3.OptoMMP.WriteSteinhartHart4096 | ( | Int32 | i32PointNumber4096, |
| Single | f32CoefA, | ||
| Single | f32CoefB, | ||
| Single | f32CoefC, | ||
| Single | f32CoefSecond | ||
| ) |
Write Steinhart-Hart linearization coefficients to the specified point. Requires R9.3e firmware or later.
Uses the following equation:
Temperature (Kelvin) = 1.0 / (f32CoefA + f32CoefB * ln(Ohms) + f32CoefSecond * (ln(Ohms)^2) + f32CoefC * (ln(Ohms)^3))
| i32PointNumber4096 | Point index in the 4096 configuration area, values 0 through 4095 Inclusive. GetPointNumberFor4096() may be used. |
| f32CoefA | Coefficient A. |
| f32CoefB | Coefficient B. |
| f32CoefC | Coefficient C. If not specified or unknown, use 0.0. |
| f32CoefSecond | Second order coefficient. If not specified or unknown, use 0.0. |
| Int32 Opto22.OptoMMP3.OptoMMP.WriteUints | ( | Int64 | i64MmpAddress, |
| Int32 | i32Length, | ||
| UInt32[] | u32aryInts, | ||
| Int32 | i32StartingIndex | ||
| ) |
Write a block of 32-bit unsigned integers to a specific Opto MMP Address.
There are many areas this toolkit does not support with a 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 unsigned integers to write. |
| u32aryInts | Array of 32-bit unsigned integers. |
| i32StartingIndex | Starting index of the u32aryInts table to write from. |
| Int32 Opto22.OptoMMP3.OptoMMP.WriteULongs | ( | Int64 | i64MmpAddress, |
| Int32 | i32Length, | ||
| UInt64[] | u64aryLongs, | ||
| Int32 | i32StartingIndex | ||
| ) |
Write a block of unsigned longs (64-bit unsigned 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 unsigned UInt64s to write. |
| u64aryLongs | Array of unsigned UInt64s to write. |
| i32StartingIndex | Starting index of u64aryLongs to write. |
| Int32 Opto22.OptoMMP3.OptoMMP.WriteWatchdogTime | ( | Int32 | 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. |
// write the watchdog time
i32Result = Mmp.WriteWatchdogTime(5000);
| const Int32 Opto22.OptoMMP3.OptoMMP.i32cMaximumPulseObjects = 512 |
SNAP-PAC has 512 pulse objects available.
|
get |
Test if there is a possibility of communicating to the remote device. The primary object may be open but the underlying communication resource may have closed.
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.
For serial, tests if the internal resource is open. This property doesn't indicate many "real world conditions" such as; USB converter unplugged, serial cable disconnected, I/O units are powered down, etc.
Boolean bCommunicationOpen = Mmp.IsCommunicationOpen();
|
get |
When a -10 Error is reported, this method returns the last Opto MMP RCode. Check Form 1465 for proper response.
Int32 i32LastMmpProtocolResultCode = Mmp.LastOptoMmpProtocolResultCode;
|
get |
Report the amount of time the last communicationt transaction consumed (in milliseconds). Includes the time consumed by transmitting the request, receiving the response, and all other associated latency. If a method that has multiple transactions was just prior used, this time represents the last transaction that occurred.
|
get |
Recommended minimum timeout in milliseconds. Serial timeout is based on a 1200 byte communication response. The value offered by this property does not take into account higher latency communications (such as wide area networks) or high-latency communication links (POTS modems, satellites, wireless spread spectrum modems, etc) or USB to serial converters with latency settings configured very high. This is just an "absolute" minimum to avoid rediculous timeout settings. Use after opening an object.
Int32 i32MinimumTimeoutMs = Mmp.MinimumRecommendedTimeoutMs;
|
getset |
Get/Set the data cache freshness value of the current device index (for TCP/UDP, always the same device, for serial, the last station address set in the property SerialDeviceIndex).
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 communication traffic and messaging of the I/O unit. Experience shows that many applicatons use point type of access methods and not bank methods. This generates an excessive amount of I/O traffic or results in a poor performing implementation. 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 caching for the Ethernet I/O unit configured or the specific serial station addressed using SerialDeviceIndex. An application may choose when to enable or disable the read data cache. Doing so could generate a large volume of I/O communication traffic or latency.
When this member is invoked, the entire data cache is invalidated.
When any write I/O operation occurs (successful or not), the entire cache for the IP address or the specific station (or serial address) is invalidated. This implies that the best use of the cache is to group reads and writes together. Mixing reads and writes may cause cache invalidation inefficiencies.
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. Any I/O writes invalidate the specific device's cache.
Negative freshness values will be treated as zero.
// set the cache freshness on serial station (address) 8 to 100 ms.
Mmp.SerialDeviceIndex = 8;
Mmp.ReadCacheFreshness = 100;
// retreive the current cache freshness time from serial device address 8.
Int32 i32ReachCacheFreshnessValueInMs = Mmp.ReadCacheFreshnessMs;
|
getset |
Receive timeout setting for the current selected serial station or network address.
The minimum timeout is 50 milliseconds, and will be used even if the value is rediculous for the specific communication arrangement.
This is the timeout used when reading OptoMMP data. Serial OptoMMP writes use half of this timeout or 50 milliseconds, which ever is larger whereas network based OptoMMP writes do not scale the timeout. This is due to the radically different time it takes to emit data on a serial wire versus a network topology.
Int32 i32ReceiveTimeoutMs = Mmp.ReceiveTimeoutMs;
|
getset |
Serial device index (also known as the serial address). If used
on an UDP or TCP based connection, the station address is force to be zero.
// set the serial device index to station 240 (base 10)
Mmp.SerialDeviceIndex = (Byte)240;
// retrieve the current selected serial station address
Byte u8CurrentSerialStation = Mmp.SerialDeviceIndex;
|
set |
Set all this object's data cache freshness times.
See ReadCacheFreshnessMs for additional information. All devices' read data caches are invalidated (reset).
// set all serial stations or the Ethernet device read cache freshness to 250ms
Mmp.SetAllReadCacheFreshnessMs = 250;
|
set |
Set the receive timeout for all devices in this object. Caution, too low of a timeout value may be accepted by this method. Please see MinimumRecommendedTimeoutMs for additional information. This method only applies a 50ms minimum timeout. Use when using PCI serial cards that have baud rate clock divider options.
// set all devices timeout to 1000 ms
Mmp.SetAllReceiveTimeoutMs(1000);