Contains settings that map a block/section of NDM signals to a
specific SLMP protocol device.
The following table describes host the NDM signal table is layed out into 4 seperate blocks specific to SLMP.
The SLMP "ControlBit" signal table/block organizes the single bit NDM signals sent from the PLC to Vision System. The ControlBit block is 80 bits long. +----------------+---------+-------+----------+-----------+-----------+------------+-----------+---------+ | | Bit 7 | Bit 6 | Bit 5 | Bit 4 | Bit 3 | Bit 2 | Bit 1 | Bit 0 | +----------------+---------+-------+----------+-----------+-----------+------------+-----------+---------+ | 0 | Set | Clear | Rsvd | Initiate | Rsvd | Rsvd | Buffer | Trigger | | | Offline | Error | | Job | | | Results | Enable | | | | | | Load | | | Enable | | +--------------------------------------------------------------------------------------------------------+ | 1 | Rsvd | +--------------------------------------------------------------------------------------------------------+ | 2-5 | SoftEvent 0-31 | +--------------------------------------------------------------------------------------------------------+ | 6 | Rsvd | Rsvd | Rsvd | Rsvd | Set User | Clear | Inspection | Trigger | | | | | | | Data 0 | Exposure | Results | Camera | | | | | | | | Complete 0 | Ack 0 | 0 | +--------------------------------------------------------------------------------------------------------+ | 7 | Rsvd | Rsvd | Rsvd | Rsvd | Set User | Clear | Inspection | Trigger | | | | | | | Data 1 | Exposure | Results | Camera | | | | | | | | Complete 1 | Ack 1 | 1 | +--------------------------------------------------------------------------------------------------------+ | 8 | Rsvd | Rsvd | Rsvd | Rsvd | Set User | Clear | Inspection | Trigger | | | | | | | Data 2 | Exposure | Results | Camera | | | | | | | | Complete 2 | Ack 2 | 2 | +--------------------------------------------------------------------------------------------------------+ | 9 | Rsvd | Rsvd | Rsvd | Rsvd | Set User | Clear | Inspection | Trigger | | | | | | | Data 3 | Exposure | Results | Camera | | | | | | | | Complete 3 | Ack 3 | 3 | +--------------------------------------------------------------------------------------------------------+ The SLMP "StatusBit" signal table/block organizes the single bit NDM signals sent from the Vision System to the PLC. The StatusBit block is 112 bits long. +----------------------------------------------------------------------------------------------------------+ ¦ ¦ Bit 7 ¦ Bit 6 ¦ Bit 5 ¦ Bit 4 ¦ Bit 3 ¦ Bit 2 ¦ Bit 1 ¦ Bit 0 ¦ +----------------------------------------------------------------------------------------------------------+ ¦ 0 ¦ Online ¦ Offline ¦ Rsvd ¦ Rsvd ¦ System ¦ System ¦ ¦ ¦ ¦ Reason ¦ ¦ ¦ Busy ¦ Ready ¦ +----------------------------------------------------------------------------------------------------------+ ¦ 1 ¦ General ¦ Rsvd ¦ Job Load ¦ Rsvd ¦ Rsvd ¦ Rsvd ¦ Rsvd ¦ Rsvd ¦ ¦ ¦ Fault ¦ ¦ Completed ¦ ¦ ¦ ¦ ¦ ¦ +----------------------------------------------------------------------------------------------------------+ ¦ 2-5 ¦ Soft Event Ack 0-31 ¦ +----------------------------------------------------------------------------------------------------------+ ¦ 6 ¦ Results ¦ Inspection ¦ Results ¦ Inspection ¦ Exposure ¦ Acq ¦ Trigger ¦ Trigger ¦ ¦ ¦ Buffer ¦ Passed 0 ¦ Valid 0 ¦ Completed 0 ¦ Complete 0 ¦ Error 0 ¦ Ack ¦ Ready ¦ ¦ ¦ Overrun 0 ¦ ¦ ¦ ¦ ¦ ¦ Camera 0 ¦ Camera 0 ¦ +----------------------------------------------------------------------------------------------------------+ ¦ 7 ¦ Rsvd ¦ Rsvd ¦ Rsvd ¦ Rsvd ¦ Rsvd ¦ Rsvd ¦ Rsvd ¦ Set ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ UserData ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ Ack 0 ¦ +----------------------------------------------------------------------------------------------------------+ ¦ 8 ¦ Results ¦ Inspection ¦ Results ¦ Inspection ¦ Exposure ¦ Acq ¦ Trigger ¦ Trigger ¦ ¦ ¦ Buffer ¦ Passed 1 ¦ Valid 1 ¦ Completed 1 ¦ Complete 1 ¦ Error 1 ¦ Ack ¦ Ready ¦ ¦ ¦ Overrun 1 ¦ ¦ ¦ ¦ ¦ ¦ Camera 1 ¦ Camera 1 ¦ +----------------------------------------------------------------------------------------------------------+ ¦ 9 ¦ Rsvd ¦ Rsvd ¦ Rsvd ¦ Rsvd ¦ Rsvd ¦ Rsvd ¦ Rsvd ¦ Set ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ UserData ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ Ack 1 ¦ +----------------------------------------------------------------------------------------------------------+ ¦ 10 ¦ Results ¦ Inspection ¦ Results ¦ Inspection ¦ Exposure ¦ Acq ¦ Trigger ¦ Trigger ¦ ¦ ¦ Buffer ¦ Passed 2 ¦ Valid 2 ¦ Completed 2 ¦ Complete 2 ¦ Error 2 ¦ Ack ¦ Ready ¦ ¦ ¦ Overrun 2 ¦ ¦ ¦ ¦ ¦ ¦ Camera 2 ¦ Camera 2 ¦ +----------------------------------------------------------------------------------------------------------+ ¦ 11 ¦ Rsvd ¦ Rsvd ¦ Rsvd ¦ Rsvd ¦ Rsvd ¦ Rsvd ¦ Rsvd ¦ Set ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ UserData ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ Ack 2 ¦ +----------------------------------------------------------------------------------------------------------+ ¦ 12 ¦ Results ¦ Inspection ¦ Results ¦ Inspection ¦ Exposure ¦ Acq ¦ Trigger ¦ Trigger ¦ ¦ ¦ Buffer ¦ Passed 3 ¦ Valid 3 ¦ Completed 3 ¦ Complete 3 ¦ Error 3 ¦ Ack ¦ Ready ¦ ¦ ¦ Overrun 3 ¦ ¦ ¦ ¦ ¦ ¦ Camera 3 ¦ Camera 3 ¦ +----------------------------------------------------------------------------------------------------------+ ¦ 13 ¦ Rsvd ¦ Rsvd ¦ Rsvd ¦ Rsvd ¦ Rsvd ¦ Rsvd ¦ Rsvd ¦ Set ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ UserData ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ ¦ Ack 3 ¦ +----------------------------------------------------------------------------------------------------------+ The SLMP "StatusWord" signal table/block organizes the word length signals sent from the Vision System to the PLC. The size of the StatusWord block can vary depending on the size of the inspection results section. +----------------------------------------------+ ¦ ¦ 16Bit Word ¦ +----------------------------------------------+ ¦ 0 ¦ Current Job ID ¦ +----------------------------------------------+ ¦ 1 ¦ Error ID ¦ +----------------------------------------------+ ¦ 2 ¦ Acquisition ID 0 ¦ +----------------------------------------------+ ¦ 3 ¦ Inspected Image ID 0 ¦ +----------------------------------------------+ ¦ 4 ¦ Inspection Result Code 0 ¦ +----------------------------------------------+ ¦ 5 ¦ Acquisition ID 1 ¦ +----------------------------------------------+ ¦ 6 ¦ Inspected Image ID 1 ¦ +----------------------------------------------+ ¦ 7 ¦ Inspection Result Code 1 ¦ +----------------------------------------------+ ¦ 8 ¦ Acquisition ID 2 ¦ +----------------------------------------------+ ¦ 9 ¦ Inspected Image ID 2 ¦ +----------------------------------------------+ ¦ 10 ¦ Inspection Result Code 2 ¦ +----------------------------------------------+ ¦ 11 ¦ Acquisition ID 3 ¦ +----------------------------------------------+ ¦ 12 ¦ Inspected Image ID 3 ¦ +----------------------------------------------+ ¦ 13 ¦ Inspection Result Code 3 ¦ +----------------------------------------------+ ¦ 14-960 ¦ Inspection Results ¦ +----------------------------------------------+ The SLMP "ControlWord" signal table/block organizes the word length signals sent from the PLC to the Vision System. The size of the ControlWord block can vary depending on the size of the user data section. +----------------------------------------------+ ¦ ¦ 16Bit Word ¦ +----------------------------------------------+ ¦ 0 ¦ Job Load ID ¦ +----------------------------------------------+ ¦ 1-960 ¦ User Data ¦ +----------------------------------------------+ You can use CogNdmSlmpSignalBlockConstants and CogNdmSlmpDeviceConstants to map blocks of NDM signals to SLMP devices with the CogNdmSlmpBlockMappingCollection class. The following table describes the SLMP memory block addresses supported on the Q, L, and FX PLCs: +-------------------------------+--------+----------------+----------------------------------+-----+----+ | Device Name | Prefix | Bit/Word based | Address Representation | Q/L | FX | +-------------------------------+--------+----------------+----------------------------------+-----+----+ | Input Relay | X | Bit | Hex(Q/L Series) Octal(FX series) | X | X | | Output Relay | Y | Bit | Hex(Q/L Series) Octal(FX series) | X | X | | Internal Relay | M | Bit | Decimal | X | X | | Latch Relay | L | Bit | Decimal | X | - | | Annunciator | F | Bit | Decimal | X | - | | Link Relay | B | Bit | Hex | X | - | | State Relay | S | Bit | Decimal | - | X | | Data Register | D | Word | Decimal | X | X | | Link Register | W | Word | Hex | X | - | | File Register | R | Word | Decimal | X | X | | File Register Multiple Blocks | ZR | Word | Hex | X | - | | Timer | TN | Word | Decimal | X | X | | Counter | CN | Word | Decimal | X | X | +-------------------------------+--------+----------------+----------------------------------+-----+----+ The most commonly used devices used to communicate vision data to a PLC, are the M (Internal Relay) and D (Data Register) types.
Inheritance Hierarchy
System MarshalByRefObject
Cognex.VisionPro.Implementation CogObjectBase
Cognex.VisionPro.Implementation CogSerializableObjectBase
Cognex.VisionPro.Implementation CogSerializableChangedEventBase
Cognex.VisionPro.Comm CogNdmSlmpBlockMapping
Namespace: Cognex.VisionPro.Comm
Assembly: Cognex.VisionPro.Comm (in Cognex.VisionPro.Comm.dll) Version: 87.1.0.0
Syntax
The CogNdmSlmpBlockMapping type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| CogNdmSlmpBlockMapping |
Construct a default CogNdmSlmpBlockMapping object.
| |
| CogNdmSlmpBlockMapping(CogNdmSlmpBlockMapping) |
Construct a deep copy of the given CogNdmSlmpBlockMapping object.
| |
| CogNdmSlmpBlockMapping(CogNdmSlmpSignalBlockConstants, CogSlmpDeviceConstants, Int64, Int64) |
Construct a CogNdmSlmpBlockMapping object from parameters.
|
Methods
| Name | Description | |
|---|---|---|
| CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.) | |
| Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
| Finalize | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) | |
| GetAttributes |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetClassName |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetComponentName |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetConverter |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetDefaultEvent |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetDefaultProperty |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetEditor |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetEvents |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetEvents( Attribute ) |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
| GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.) | |
| GetObjectData |
Implements the GetObjectData method of the ISerializable interface.
(Inherited from CogSerializableObjectBase.) | |
| GetProperties |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetProperties( Attribute ) |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetPropertyOwner |
Implements the corresponding member of the ICustomTypeDescriptor interface.
May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.) | |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.) | |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
| MemberwiseClone(Boolean) | Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.) | |
| OnChanged(Int64) |
This method should be called internally whenever the object's state may
have changed.
(Inherited from CogSerializableChangedEventBase.) | |
| OnChanged(CogChangedEventArgs) |
This method may be called internally whenever a derived object's state
may have changed and the derived object expresses this change via a
derived CogChangedEventArgs class.
(Inherited from CogSerializableChangedEventBase.) | |
| ResumeAndRaiseChangedEvent |
Re-enables raising of the Changed event after SuspendChangedEvent
has been called, and raises the Changed event if the
ChangedEventSuspended count is reduced to zero and any changes were
made while events were suspended. Must be called once for each call to
SuspendChangedEvent.
(Inherited from CogSerializableChangedEventBase.) | |
| SuspendChangedEvent |
Temporarily suspends the raising of the Changed event. May be called
more than once, and a corresponding call to ResumeAndRaiseChangedEvent
must be made for each call to SuspendChangedEvent.
(Inherited from CogSerializableChangedEventBase.) | |
| ToString | Returns a String that represents the current Object. (Inherited from Object.) |
Fields
| Name | Description | |
|---|---|---|
| SfNdmSignalBlock |
This bit will be set in the EventArgs of a Changed event every time the
value returned by NdmSignalBlock may have changed.
| |
| SfNextSf | ||
| SfSlmpDevice |
This bit will be set in the EventArgs of a Changed event every time the
value returned by NdmSlmpDevice may have changed.
| |
| SfSlmpDeviceOffset |
This bit will be set in the EventArgs of a Changed event every time the
value returned by SlmpDeviceOffset may have changed.
| |
| SfSlmpDeviceSizeInBits |
This bit will be set in the EventArgs of a Changed event every time the
value returned by SlmpDevcieSizeInBits may have changed.
|
Properties
| Name | Description | |
|---|---|---|
| ChangedEventSuspended |
If nonzero, indicates that the raising of the Changed event has been
suspended. This value is incremented when SuspendChangedEvent is called
and decremented when ResumeAndRaiseChangedEvent is called.
(Inherited from CogSerializableChangedEventBase.) | |
| HasChanged | (Inherited from CogSerializableChangedEventBase.) | |
| NdmSignalBlock |
Gets/sets the NDM signal block that is mapped.
| |
| SlmpDevice |
Gets/sets the SLMP device that it mapped.
| |
| SlmpDeviceOffset |
Gets/sets the offset into the SLMP device where the NDM
signal block is mapped. The offset it specified in the units
(bits or words) of the mapped SLMP device memory area.
Consult the table below to know which SLMP Device memory areas
are bit based and which are word based.
+-------------------------------+--------+----------------+----------------------------------+-----+----+ | Device Name | Prefix | Bit/Word based | Address Representation | Q/L | FX | +-------------------------------+--------+----------------+----------------------------------+-----+----+ | Input Relay | X | Bit | Hex(Q/L Series) Octal(FX series) | X | X | | Output Relay | Y | Bit | Hex(Q/L Series) Octal(FX series) | X | X | | Internal Relay | M | Bit | Decimal | X | X | | Latch Relay | L | Bit | Decimal | X | - | | Annunciator | F | Bit | Decimal | X | - | | Link Relay | B | Bit | Hex | X | - | | State Relay | S | Bit | Decimal | - | X | | Data Register | D | Word | Decimal | X | X | | Link Register | W | Word | Hex | X | - | | File Register | R | Word | Decimal | X | X | | File Register Multiple Blocks | ZR | Word | Hex | X | - | | Timer | TN | Word | Decimal | X | X | | Counter | CN | Word | Decimal | X | X | +-------------------------------+--------+----------------+----------------------------------+-----+----+ | |
| SlmpDeviceSizeInBits |
Gets/sets the size of the NDM signal block which is
mapped into the SLMP device. The size is always specified in
bits even for SLMP devices memory areas which are word based.
| |
| StateFlags |
Returns the complete set of state flags supported on this object. The
flags may be indexed by name as shown in the following C# code snippet:
if (changedObject.StateFlags["Color"] & eventArgs.StateFlags) { ... }
(Inherited from CogSerializableChangedEventBase.) |
Events
| Name | Description | |
|---|---|---|
| Changed |
This event is raised when one or more parts of the object's state may
have changed.
(Inherited from CogSerializableChangedEventBase.) |
See Also