@prototwin/sick-csm

1.0.0PublicPublished 29 days ago

Sick CSM color sensor.

Latest Version: 1.0.0

Size: 4 KB

Publisher: ProtoTwin (contact@prototwin.com)

README.md

SICK CSM Sensor

The SickCSM component simulates a SICK CSM color sensor using a graphics raycast. It compares the detected surface color against up to eight configured colors. Each color has an individual sensitivity, and multiple colors may match at the same time.

Properties

  • Origin: The local origin of the sensor beam.
  • Direction: The local direction of the sensor beam.
  • Minimum Range: The minimum usable sensing distance.
  • Maximum Range: The maximum usable sensing distance.
  • Colors: Up to eight programmed colors.
  • Sensitivities: The sensitivity for each color:
    • Fine: 10%
    • Medium: 20%
    • Coarse: 50%
  • Object: The detected entity, or null when no configured color matches.
  • Value: The current 16-bit process data value, indicating which colors have been matched.
  • Blocked: The material used while at least one output is active.
  • Cleared: The material used while no output is active.
  • Indicator: The entity used to display the sensor state.

IO

  • Q1: (Output) true when programmed color 1 matches.
  • Q2: (Output) true when programmed color 2 matches.
  • ProcessData: (Output) The 16-bit IO-Link process data.

The ProcessData output uses the lower eight bits, with bits 8 through 15 remaining zero:

Bit Signal
0 QL1
1 QL2
2 QL3
3 QL4
4 QL5
5 QL6
6 QL7
7 QL8

The Q1 and Q2 outputs mirror bits 0 and 1 respectively. Without IO-Link, a PLC can use Q1 and Q2 as standard digital inputs. With IO-Link, it can decode all eight color matches from the ProcessData word.

Changelog

1.0.0

Initial release.