Motion, Drive, and Semiconductor Objects#

The CIP Motion Device family (position sensor/controller, block sequencer, motion axis), the Hierarchy of Motor Control Devices (motor data, control supervisor, AC/DC drive, softstart), and the Hierarchy of Semiconductor Equipment Devices object family.

[ODVA CIP Vol 1] Wrappers for the CIP Motion Device family:

  • Position Sensor (class 0x23, §5-23),

  • Position Controller Supervisor (class 0x24, §5-24),

  • Position Controller (class 0x25, §5-25),

  • Block Sequencer (class 0x26, §5-26),

  • Command Block (class 0x27, §5-27), and

  • Motion Axis (class 0x42, §5-46).

class icspacket.proto.cip.objects.motion.BlockSequencerObject(connection: CIP_Connection, instance: int = 1)[source]#

Executes a Command Block or chain of linked Command Blocks (See CIP Vol 1, §5-26).

block: CIPAttribute[int]#

Instance number of the starting Command Block, 1-255 (attribute 1, required).

block_execute: CIPAttribute[int]#

Set to execute the block chain starting at block; reads cleared once the chain is done (attribute 2, required).

current_block: CIPAttribute[int]#

Instance number of the currently executing Command Block (attribute 3, required).

block_fault: CIPAttribute[int]#

Set on a Wait Equals time-out or an invalid Command Block; execution stops.

Reset when block_fault_code is read (attribute 4, required).

block_fault_code: CIPAttribute[int]#

0=No fault, 1=Invalid/empty block data, 2=Command time-out (Wait Equals), 3=Execution fault (attribute 5).

counter: CIPAttribute[int]#

Positive-only counter usable for sequencing loops (attribute 6).

class icspacket.proto.cip.objects.motion.CommandBlockObject(connection: CIP_Connection, instance: int = 1)[source]#

Defines one command in a Block Sequencer chain (See CIP Vol 1, §5-27).

Attributes 3-7 change meaning based on block_command and are therefore exposed as raw bytes (their wire type is only determined at runtime by that value); decode/encode them per the command tables below (See §5-27.3 for the full definitions):

  • 1 Modify Attribute: 3=target_class (USINT), 4=target_instance (USINT), 5=attribute # (USINT), 6=attribute data (per attribute #).

  • 2 Wait Equals: 3=target_class (USINT), 4=target_instance (USINT), 5=attribute # (USINT), 6=compare time-out ms (DINT), 7=compare data (per attribute #).

  • 3 Conditional Link Greater Than / 4 Conditional Link Less Than: 3=target_class (USINT), 4=target_instance (USINT), 5=attribute # (USINT), 6=compare link # (USINT), 7=compare data (per attribute #).

  • 5 Decrement Counter: no additional attributes.

  • 6 Delay: 3=delay in milliseconds (DINT).

  • 7 Trajectory / 8 Trajectory and Wait: 3=target position (DINT), 4=target velocity (DINT), 5=incremental flag (BOOL).

  • 9 Velocity Change: 3=target velocity (DINT).

  • 10 Goto Home: 3=home offset (DINT), 4=target velocity (DINT).

  • 11 Goto Index: 3=index offset (DINT), 4=target velocity (DINT).

  • 12 Goto Registration Position: 3=registration offset (DINT), 4=target velocity (DINT).

block_command: CIPAttribute[int]#

Selects the command format used by attributes 3-7, 1-12 (attribute 1, required).

Instance number of the next Command Block to execute once this one is done (attribute 2, required).

data_3: CIPAttribute[bytes]#

Command-dependent parameter (attribute 3, See class docstring).

data_4: CIPAttribute[bytes]#

Command-dependent parameter (attribute 4, See class docstring).

data_5: CIPAttribute[bytes]#

Command-dependent parameter (attribute 5, See class docstring).

data_6: CIPAttribute[bytes]#

Command-dependent parameter (attribute 6, See class docstring).

data_7: CIPAttribute[bytes]#

Command-dependent parameter (attribute 7, See class docstring).

class icspacket.proto.cip.objects.motion.GroupSyncResult(synchronized: int, system_time_offset: int)[source]#

GroupSync service response payload (attribute-less service; See §5-46.28.1, Table 5-46.65).

synchronized: int#

1 if the drive is presently group synchronized to the IEEE-1588 time master, 0 otherwise.

system_time_offset: int#

The drive’s current System Time Offset, in nanoseconds (CIP Sync absolute).

class icspacket.proto.cip.objects.motion.MotionAxisObject(connection: CIP_Connection, instance: int = 1)[source]#

One axis of a CIP Motion drive (See CIP Vol 1, §5-46).

This object’s real-world attribute space spans hundreds of IDs across many functional categories (motor nameplate, feedback, event capture, command reference generation, position/velocity/acceleration/torque/ current/frequency control loops, stopping/braking, DC bus, power/thermal management, exception/fault/alarm handling, statistics, and more; See §5-46.9 through §5-46.26) and its own connection-data-shaped class attributes (10/11). Modeling it exhaustively is out of scope here; only the small set of attributes required unconditionally for every axis instance - regardless of Control Mode/Method - are exposed below. Anything else remains reachable via the inherited get()/set() with the attribute ID from the relevant spec section.

Class attributes 14-20 (Node Control/Status/Fault/Alarm and Controller Update Period/Time Offset/Time Stamp) govern the CIP Sync communications node behind this axis and are available via get_class_attribute().

control_mode: CIPAttribute[int]#

4-bit Motor Control enumeration (bits 0-3; bits 4-7 reserved): 0=No Control, 1=Position Control, 2=Velocity Control, 3=Acceleration Control, 4=Torque Control, 5=Current Control (attribute 80, required for all axes, See §5-46.8.2).

control_method: CIPAttribute[int]#

0=No Control, 1=Frequency Control (open loop V/Hz), 2=PI Vector Control (closed loop) (attribute 81, required for all axes, See §5-46.8.3).

feedback_configuration: CIPAttribute[int]#

4-bit Feedback Selection enumeration (bits 0-3; bits 4-7 reserved):

0=No Feedback, 1=Master Feedback, 2=Motor Feedback, 3=Load Feedback, 4=Dual Feedback (attribute 82, required for all axes, See §5-46.10.2).

feedback_master_select: CIPAttribute[int]#

Logical feedback channel assigned when feedback_configuration is Master Feedback: 1=Feedback 1, 2=Feedback 2, … (attribute 83, required for all axes).

status_data_set: CIPAttribute[int]#

Bitmap selecting which status attributes are produced to the controller over the Device-to-Controller Connection (attribute 94, required for all axes, See §5-46.17.4).

axis_state: CIPAttribute[int]#

0=Initializing, 1=Pre-Charge, 2=Stopped, 3=Starting, 4=Running, 5=Testing, 6=Stopping, 7=Aborting, 8=Major Faulted, 9=Start Inhibited, 10=Shutdown (attribute 650, required for all axes).

axis_status: CIPAttribute[int]#

Bitmap of internal axis status conditions, e.g. Local Control, Alarm, DC Bus Up, Power Structure Enabled, …

(attribute 651, required for all axes, See §5-46.17.2).

axis_status_mfg: CIPAttribute[int]#

Vendor-specific axis status bitmap (attribute 652, required for all axes).

axis_io_status: CIPAttribute[int]#

Bitmap of standard digital I/O state, e.g. Enable/Home/Registration/ Overtravel inputs (attribute 653, required for all axes, See §5-46.17.3).

axis_io_status_mfg: CIPAttribute[int]#

Vendor-specific digital I/O status bitmap (attribute 654, required for all axes).

get_class_attribute(attribute: int) bytes[source]#

Read a Motion Axis class attribute from instance 0 (See §5-46.5).

group_sync(system_time_offset: int) GroupSyncResult[source]#

Invoke GroupSync (0x1C), passing the controller’s current System Time Offset and checking whether this drive is presently synchronized with the controller’s Motion Group (See §5-46.28.1).

class icspacket.proto.cip.objects.motion.PositionControllerObject(connection: CIP_Connection, instance: int = 1)[source]#

Performs profile velocity/position generation and handles motor drive unit I/O, limit switches, and registration (See CIP Vol 1, §5-25).

Attribute 28 is reserved.

num_attributes: CIPAttribute[int]#

Number of attributes supported (attribute 1).

attributes: CIPAttribute[Collection[int]]#

List of attribute IDs supported by this instance (attribute 2).

mode: CIPAttribute[int]#

0 = Position mode (default), 1 = Velocity mode, 2 = Torque mode (attribute 3).

position_units: CIPAttribute[int]#

Actual position feedback counts equal to one position unit; default 1 (attribute 4).

profile_units: CIPAttribute[int]#

Actual position feedback counts per second/second^2 equal to one profile unit; default 1 (attribute 5).

target_position: CIPAttribute[int]#

Profile move position, in position units (attribute 6, required).

target_velocity: CIPAttribute[int]#

Profile velocity, in profile units/second (attribute 7, required).

acceleration: CIPAttribute[int]#

Profile acceleration rate, in profile units/second^2 (attribute 8, required).

deceleration: CIPAttribute[int]#

Profile deceleration rate, in profile units/second^2 (attribute 9).

incremental_position_flag: CIPAttribute[int]#

0 = target_position is absolute, 1 = incremental (attribute 10).

load_data_profile_handshake: CIPAttribute[int]#

Loads command data and starts/tracks a Profile Move (attribute 11, required, See §5-25.3.1.1).

on_target_position: CIPAttribute[int]#

Set when the actual position is within the deadband (attribute 38) of the target position (attribute 12).

actual_position: CIPAttribute[int]#

Actual absolute position, in position units; write to redefine it (attribute 13).

actual_velocity: CIPAttribute[int]#

Actual velocity, in profile units/second (attribute 14).

commanded_position: CIPAttribute[int]#

Instantaneous calculated position (attribute 15).

commanded_velocity: CIPAttribute[int]#

Instantaneous calculated velocity, in profile units/second (attribute 16).

enable: CIPAttribute[int]#

Set to enable drive and feedback, clear to disable (attribute 17).

profile_type: CIPAttribute[int]#

0 = Trapezoidal, 1 = S-Curve, 2 = Parabolic (attribute 18).

profile_gain: CIPAttribute[int]#

Vendor-specific gain for non-trapezoidal profiles (attribute 19).

smooth_stop: CIPAttribute[int]#

Set to force deceleration to zero velocity at the programmed decel rate (attribute 20).

hard_stop: CIPAttribute[int]#

Set to force immediate deceleration to zero velocity at max decel rate (attribute 21).

jog_velocity: CIPAttribute[int]#

Jogging velocity, in profile units/second (attribute 22).

direction: CIPAttribute[int]#

Instantaneous direction: 0 = negative/reverse, 1 = positive/forward (attribute 23).

reference_direction: CIPAttribute[int]#

0 = forward is clockwise, 1 = reverse is counter-clockwise (attribute 24).

torque: CIPAttribute[int]#

Output torque; 0 = no torque output (Torque mode only) (attribute 25).

positive_torque_limit: CIPAttribute[int]#

Maximum allowable torque output in the positive direction (attribute 26).

negative_torque_limit: CIPAttribute[int]#

Maximum allowable torque output in the negative direction (attribute 27).

wrap_around: CIPAttribute[int]#

Position wrap-around flag (Velocity mode only); resets when read (attribute 29).

kp: CIPAttribute[int]#

Proportional gain, range 0-32767 (attribute 30).

ki: CIPAttribute[int]#

Integral gain, range 0-32767 (attribute 31).

kd: CIPAttribute[int]#

Derivative gain, range 0-32767 (attribute 32).

max_ki: CIPAttribute[int]#

Integration limit, range 0-32767 (attribute 33).

ki_mode: CIPAttribute[int]#

0 = use Ki term always, 1 = use Ki only when stopped/holding position (attribute 34).

velocity_feed_forward: CIPAttribute[int]#

Velocity feed forward gain, range 0-32767 (attribute 35).

accel_feed_forward: CIPAttribute[int]#

Acceleration feed forward gain, range 0-32767 (attribute 36).

sample_rate: CIPAttribute[int]#

Update sample rate, in microseconds (attribute 37).

position_deadband: CIPAttribute[int]#

Window preventing axis hunting, range 0-255 (attribute 38).

feedback_enable: CIPAttribute[int]#

Tracks enable (attribute 17); can be cleared independently for drive offset adjustments (attribute 39).

feedback_resolution: CIPAttribute[int]#

Feedback counts per revolution of the position feedback device (attribute 40).

motor_resolution: CIPAttribute[int]#

Motor steps per revolution of the motor (attribute 41).

position_tracking_gain: CIPAttribute[int]#

Gain for stepper position maintenance via position feedback (attribute 42).

max_correction_velocity: CIPAttribute[int]#

Position maintenance value to prevent stepper stalls, in counts/second (attribute 43).

max_static_following_error: CIPAttribute[int]#

Maximum following error allowed while stopped and holding position (attribute 44).

max_dynamic_following_error: CIPAttribute[int]#

Maximum following error allowed while in motion (attribute 45).

following_error_action: CIPAttribute[int]#

0=Generator off, 1=Hard stop, 2=Smooth stop, 3=No action (attribute 46).

following_error_fault: CIPAttribute[int]#

Set when a following error occurs (attribute 47).

actual_following_error: CIPAttribute[int]#

Actual following error, in position feedback counts (attribute 48).

hard_limit_action: CIPAttribute[int]#

0=Generator off, 1=Hard stop, 2=Smooth stop (attribute 49).

forward_limit: CIPAttribute[int]#

Set when the forward hard limit is active (attribute 50).

reverse_limit: CIPAttribute[int]#

Set when the reverse hard limit is active (attribute 51).

soft_limit_enable: CIPAttribute[int]#

When set, motion beyond the soft limits results in a motor stop (attribute 52).

soft_limit_action: CIPAttribute[int]#

0=Generator off, 1=Hard stop, 2=Smooth stop (attribute 53).

positive_soft_limit_position: CIPAttribute[int]#

Soft limit positive boundary, in position units (attribute 54).

negative_soft_limit_position: CIPAttribute[int]#

Soft limit negative boundary, in position units (attribute 55).

positive_limit_triggered: CIPAttribute[int]#

Set when a positive hard limit stop occurs (attribute 56).

negative_limit_triggered: CIPAttribute[int]#

Set when a negative hard limit stop occurs (attribute 57).

load_data_complete: CIPAttribute[int]#

Set once valid I/O command message data has been loaded (attribute 58, required, See §5-25.3.1.2).

class icspacket.proto.cip.objects.motion.PositionControllerSupervisorObject(connection: CIP_Connection, instance: int = 1)[source]#

Handles Position Controller error/fault management plus Home, Index, and Registration inputs (See CIP Vol 1, §5-24).

Class attributes 32/33 (Consumed/Produced Axis Selection Number) route I/O Command/Response Message data to the axis number in range 1-7; read them via get_class_attribute().

num_attributes: CIPAttribute[int]#

Number of attributes supported (attribute 1).

attributes: CIPAttribute[Collection[int]]#

List of attribute IDs supported by this instance (attribute 2).

axis_number: CIPAttribute[int]#

Axis number, same as the instance number, in range 1-7 (attribute 3).

general_fault: CIPAttribute[int]#

Logical OR of all fault condition flags; 1 = fault exists (attribute 5).

command_message_type: CIPAttribute[int]#

I/O command message type sent by the controlling device, 1-0x1F (attribute 6).

response_message_type: CIPAttribute[int]#

I/O response message type returned to the controlling device, 1-0x1F (attribute 7).

fault_input: CIPAttribute[int]#

1 = fault input is active (attribute 8).

fault_input_action: CIPAttribute[int]#

0=Command Output Generator off, 1=Hard stop, 2=Smooth stop, 3=No action (attribute 9).

home_action: CIPAttribute[int]#

Action taken when the armed home input triggers: 0=Generator off, 1=Hard stop, 2=Smooth stop, 3=No action, 4=Gate index (attribute 10).

home_active_level: CIPAttribute[int]#

0 = active low, 1 = active high (attribute 11).

home_arm: CIPAttribute[int]#

Write 1 to arm the Home input; reads 0 once the trigger has occurred (attribute 12).

index_action: CIPAttribute[int]#

0=Generator off, 1=Hard stop, 2=Smooth stop, 3=No action (attribute 13).

index_active_level: CIPAttribute[int]#

0 = active low, 1 = active high (attribute 14).

index_arm: CIPAttribute[int]#

Write 1 to arm the Index input; reads 0 once the trigger has occurred (attribute 15).

home_input_level: CIPAttribute[int]#

Actual level of the Home input (attribute 16).

home_position: CIPAttribute[int]#

Position captured when the Home input triggered (attribute 17).

index_position: CIPAttribute[int]#

Position captured when the Index input triggered (attribute 18).

registration_action: CIPAttribute[int]#

0=Generator off, 1=Hard stop, 2=Smooth stop, 3=No action, 4=Go to Reg position offset, 5=Go to Reg position absolute (attribute 19).

registration_active_level: CIPAttribute[int]#

0 = active low, 1 = active high (attribute 20).

registration_arm: CIPAttribute[int]#

Write 1 to arm the Registration input; reads 0 once triggered (attribute 21).

registration_input_level: CIPAttribute[int]#

Actual level of the Registration input (attribute 22).

registration_offset: CIPAttribute[int]#

Offset/absolute position applied per registration_action (attribute 23).

registration_position: CIPAttribute[int]#

Position captured when the Registration input triggered (attribute 24).

follow_enable: CIPAttribute[int]#

0 = following disabled, 1 = following enabled (attribute 25).

follow_axis: CIPAttribute[int]#

0 = no following, 1-255 = axis to follow (attribute 26).

follow_divisor: CIPAttribute[int]#

Divides the Follow Axis position when computing the Command Position (attribute 27).

follow_multiplier: CIPAttribute[int]#

Multiplies the Follow Axis position when computing the Command Position (attribute 28).

get_class_attribute(attribute: int) bytes[source]#

Read a Position Controller Supervisor class attribute from instance 0 (See §5-24.2).

class icspacket.proto.cip.objects.motion.PositionSensorObject(connection: CIP_Connection, instance: int = 1)[source]#

Interface to an absolute position sensor (encoder/resolver), extended with zero offset and CAM (virtual limit switch) checking (See CIP Vol 1, §5-23).

One and only one of position_value_unsigned/position_value_signed is normally implemented (attributes 3/10). The CAM channel arrays (attributes 35-40) are each sized by num_cam_channels (attribute 34) and are exposed as raw bytes rather than a fixed schema; use the Get_Member/Set_Member services (0x18/0x19) to access individual elements.

num_attributes: CIPAttribute[int]#

Number of attributes supported (attribute 1).

attributes: CIPAttribute[Collection[int]]#

List of attribute IDs supported by this instance (attribute 2).

position_value_unsigned: CIPAttribute[int]#

Current position, conditioned by value_bit_resolution/zero_offset (attribute 3).

cam: CIPAttribute[int]#

Virtual CAM switch value: 0 = Off, 1 = On (attribute 4).

value_bit_resolution: CIPAttribute[int]#

Position sensor resolution, in significant bits (attribute 5).

zero_offset: CIPAttribute[int]#

Value added to the raw position to adjust the zero point (attribute 6).

cam_low_limit: CIPAttribute[int]#

Virtual CAM switch low limit; default 0 (attribute 7).

cam_high_limit: CIPAttribute[int]#

Virtual CAM switch high limit; default 0 (attribute 8).

auto_zero: CIPAttribute[int]#

Rising edge sets zero_offset to the current position (attribute 9).

position_value_signed: CIPAttribute[int]#

Current position, unconditioned by resolution/offset (attribute 10).

position_sensor_type: CIPAttribute[int]#

0=Single-turn resolver, 1=Single-turn absolute encoder, 2=Multi-turn absolute encoder, …, 8=Absolute linear encoder, 9=Absolute linear encoder w/ cyclic coding (attribute 11, See Table 5-23.8).

direction_counting_toggle: CIPAttribute[int]#

Defines the direction of increasing position value; default 0 (attribute 12, required).

commissioning_diagnostic_control: CIPAttribute[int]#

0 = OFF, 1 = ON (default); checks the encoder at standstill (attribute 13).

scaling_function_control: CIPAttribute[int]#

0 = OFF, 1 = ON (default); converts physical_resolution_span (attribute 42) to a numerical value (attribute 14).

position_format: CIPAttribute[bytes]#

ENGUNIT-coded format of the position value; default is counts (attribute 15).

measuring_units_per_span: CIPAttribute[int]#

Distinguishable steps per one complete span; <= physical_resolution_span (attribute 16).

total_measuring_range: CIPAttribute[int]#

Steps over the total measuring range; rotary encoders only (attribute 17).

position_measuring_increment: CIPAttribute[int]#

Smallest incremental change of the position value; default 1 (attribute 18).

preset_value: CIPAttribute[int]#

Output position value is set to this value (attribute 19).

cos_delta: CIPAttribute[int]#

Value for position change in Change-Of-State mode (attribute 20).

position_state: CIPAttribute[int]#

Software limit switch state: bit 0 = out of range, bit 1 = range overflow, bit 2 = range underflow (attribute 21).

position_low_limit: CIPAttribute[int]#

Low limit position (attribute 22).

position_high_limit: CIPAttribute[int]#

High limit position (attribute 23).

velocity_value: CIPAttribute[int]#

Current speed, in the format defined by velocity_format/ velocity_resolution (attribute 24).

velocity_format: CIPAttribute[bytes]#

ENGUINT-coded format of the velocity attributes; default 0x1f04 = counts/second (attribute 25).

velocity_resolution: CIPAttribute[int]#

Smallest incremental change of velocity_value; default 1 (attribute 26).

minimum_velocity_setpoint: CIPAttribute[int]#

Minimum velocity trigger threshold; default 0x80000000 (attribute 27).

maximum_velocity_setpoint: CIPAttribute[int]#

Maximum velocity trigger threshold; default 0xEFFFFFFF (attribute 28).

acceleration_value: CIPAttribute[int]#

Current acceleration (positive) or deceleration (negative) (attribute 29).

acceleration_format: CIPAttribute[bytes]#

ENGUINT-coded format of the acceleration attributes; default 0x1500 = m/s2 (attribute 30).

acceleration_resolution: CIPAttribute[int]#

Smallest incremental change of acceleration_value; default 1 (attribute 31).

minimum_acceleration_setpoint: CIPAttribute[int]#

Minimum acceleration trigger threshold; default 0x80000000 (attribute 32).

maximum_acceleration_setpoint: CIPAttribute[int]#

Maximum acceleration trigger threshold; default 0xEFFFFFFF (attribute 33).

num_cam_channels: CIPAttribute[int]#

Number of independent CAM channels (attribute 34).

cam_channel_state: CIPAttribute[bytes]#

Bit array (one bit per CAM channel) of CAM channel state; size defined by num_cam_channels (attribute 35).

cam_channel_polarity: CIPAttribute[bytes]#

Bit array of CAM channel polarity; size defined by num_cam_channels (attribute 36).

cam_channel_enable: CIPAttribute[bytes]#

Bit array enabling each CAM channel; size defined by num_cam_channels (attribute 37).

cam_low_limit_array: CIPAttribute[bytes]#

Array of DINT lower switch points, one per CAM channel (attribute 38).

cam_high_limit_array: CIPAttribute[bytes]#

Array of DINT upper switch points, one per CAM channel (attribute 39).

cam_hysteresis: CIPAttribute[bytes]#

Array of UINT hysteresis values, one per CAM channel (attribute 40).

operating_status: CIPAttribute[int]#

Encoder diagnostic operating status (attribute 41).

physical_resolution_span: CIPAttribute[int]#

Distinguishable steps per one complete span (attribute 42).

num_spans: CIPAttribute[int]#

Number of turns for a rotary device; default 1 (attribute 43).

alarms: CIPAttribute[int]#

Malfunction bitmap that could lead to an incorrect position value (attribute 44).

supported_alarms: CIPAttribute[int]#

Bitmap of alarms supported by this instance (attribute 45).

alarm_flag: CIPAttribute[int]#

0 = OK, 1 = an alarm has occurred (attribute 46).

warnings: CIPAttribute[int]#

Bitmap of internal parameters exceeded (attribute 47).

supported_warnings: CIPAttribute[int]#

Bitmap of warnings supported by this instance (attribute 48).

warning_flag: CIPAttribute[int]#

0 = OK, 1 = a warning has occurred (attribute 49).

operating_time: CIPAttribute[int]#

Encoder operating time, in tenths of an hour (attribute 50).

offset_value: CIPAttribute[int]#

Offset calculated by the preset function (attribute 51).

get_class_attribute(attribute: int) bytes[source]#

Read a Position Sensor class attribute from instance 0 (See §5-23.2).

reset(reset_type: int = 0) bytes[source]#

Invoke Reset (0x05). reset_type: 0 = emulate cycling power (default), 1 = restore out-of-box configuration then cycle power.

apply_attributes() bytes[source]#

Invoke Apply_Attributes (0x0D), activating configuration changes made by prior Set_Attribute_Single calls.

restore() bytes[source]#

Invoke Restore, reloading attribute values saved via save().

save() bytes[source]#

Invoke Save, persisting all attribute values to non-volatile storage.

[ODVA CIP Vol 1] Wrappers for the “Hierarchy of Motor Control Devices” object group:

  • Motor Data (class 0x28, §5-28),

  • Control Supervisor (class 0x29, §5-29),

  • AC/DC Drive (class 0x2A, §5-30),

  • Acknowledge Handler (class 0x2B, §5-31),

  • Overload (class 0x2C, §5-32), and

  • Softstart (class 0x2D, §5-33).

class icspacket.proto.cip.objects.drive.ACDCDriveObject(connection: CIP_Connection, instance: int = 1)[source]#

Models functions specific to an AC or DC drive: speed/torque/process control, ramping, and scaling (See CIP Vol 1, §5-30).

Most measurement/reference attributes are scaled integers; the divisor is 2 ** <attribute>_scale as documented on each attribute. process_data_units/speed_actual_data_units/speed_ref_data_units select an ENGUNITS code from CIP Vol 1 Appendix D (not decoded elsewhere in this library), so they are kept as raw bytes.

num_attr: CIPAttribute[int]#

Number of attributes supported (attribute 1).

attributes: CIPAttribute[Collection[int]]#

List of attribute IDs supported by this instance (attribute 2).

at_reference: CIPAttribute[int]#

1 = drive actual is at its speed/torque reference (attribute 3).

net_ref: CIPAttribute[int]#

Requests torque/speed reference to be local (0) or from the network (1) (attribute 4, required).

net_proc: CIPAttribute[int]#

Requests process control reference to be local (0) or from the network (1) (attribute 5).

drive_mode: CIPAttribute[int]#

0=Vendor specific, 1=Open loop speed, 2=Closed loop speed, 3=Torque, 4=Process control, 5=Position control (attribute 6, required).

speed_actual: CIPAttribute[int]#

Actual drive speed, Units: RPM / 2**speed_scale (attribute 7, required).

speed_ref: CIPAttribute[int]#

Speed reference, Units: RPM / 2**speed_scale (attribute 8, required).

current_actual: CIPAttribute[int]#

Actual motor phase current, Units: 100mA / 2**current_scale (attribute 9).

current_limit: CIPAttribute[int]#

Motor phase current limit, Units: 100mA / 2**current_scale (attribute 10).

torque_actual: CIPAttribute[int]#

Actual torque, Units: Nm / 2**torque_scale (attribute 11).

torque_ref: CIPAttribute[int]#

Torque reference, Units: Nm / 2**torque_scale (attribute 12).

process_actual: CIPAttribute[int]#

Actual process control value, Units: % / 2**process_scale (attribute 13).

process_ref: CIPAttribute[int]#

Process control reference set point, Units: % / 2**process_scale (attribute 14).

power_actual: CIPAttribute[int]#

Actual output power, Units: W / 2**power_scale (attribute 15).

input_voltage: CIPAttribute[int]#

Input voltage, Units: V / 2**voltage_scale (attribute 16).

output_voltage: CIPAttribute[int]#

Output voltage, Units: V / 2**voltage_scale (attribute 17).

accel_time: CIPAttribute[int]#

Acceleration time from 0 to high_speed_limit, Units: ms / 2**time_scale (attribute 18).

decel_time: CIPAttribute[int]#

Deceleration time from high_speed_limit to 0, Units: ms / 2**time_scale (attribute 19).

low_speed_limit: CIPAttribute[int]#

Minimum speed limit, Units: RPM / 2**speed_scale (attribute 20).

high_speed_limit: CIPAttribute[int]#

Maximum speed limit, Units: RPM / 2**speed_scale (attribute 21).

speed_scale: CIPAttribute[int]#

Speed scaling factor, range -128..127 (attribute 22).

current_scale: CIPAttribute[int]#

Current scaling factor, range -128..127 (attribute 23).

torque_scale: CIPAttribute[int]#

Torque scaling factor, range -128..127 (attribute 24).

process_scale: CIPAttribute[int]#

Process scaling factor, range -128..127 (attribute 25).

power_scale: CIPAttribute[int]#

Power scaling factor, range -128..127 (attribute 26).

voltage_scale: CIPAttribute[int]#

Voltage scaling factor, range -128..127 (attribute 27).

time_scale: CIPAttribute[int]#

Time scaling factor, range -128..127 (attribute 28).

ref_from_net: CIPAttribute[int]#

Status of torque/speed reference: 0=local, 1=network (attribute 29).

proc_from_net: CIPAttribute[int]#

Status of process control reference: 0=local, 1=network (attribute 30).

field_i_or_v: CIPAttribute[int]#

Selects Field Voltage (0) or Field Current (1) control for a DC drive (attribute 31).

field_volt_ratio: CIPAttribute[int]#

Field voltage ratio, for voltage control of a DC drive (attribute 32).

field_current_setpoint: CIPAttribute[int]#

DC drive field current set point, Units: A / 2**current_scale (attribute 33).

field_weakening_enable: CIPAttribute[int]#

Enables (1) or disables (0) field weakening for a DC drive (attribute 34).

field_current_actual: CIPAttribute[int]#

Actual field current for a DC drive, Units: A / 2**current_scale (attribute 35).

field_min_current: CIPAttribute[int]#

Minimum field current for a DC drive, Units: A / 2**current_scale (attribute 36).

process_data_units: CIPAttribute[bytes]#

ENGUNITS code applied to process_actual/process_ref (attribute 37).

speed_control: CIPAttribute[int]#

Bit flags requesting speed commands: bit0=Run, bit1=Idle, bit2=Standby, bit3=Coast (attribute 38, See Table 5-30.4).

speed_status: CIPAttribute[int]#

Bit flags indicating current speed status (attribute 39, See Table 5-30.4).

speed_trip_time: CIPAttribute[int]#

Time speed_actual may exceed a vendor-specific hysteresis band, Units:

ms / 2**time_scale (attribute 40).

max_rated_speed: CIPAttribute[int]#

Vendor specific maximum rating, Units: RPM / 2**max_rated_speed_scale (attribute 41).

max_rated_speed_scale: CIPAttribute[int]#

Speed scaling for max_rated_speed, range -128..127 (attribute 42).

speed_standby: CIPAttribute[int]#

Speed setting used in Standby, Units: RPM / 2**speed_scale (attribute 43).

speed_actual_data_units: CIPAttribute[bytes]#

ENGUNITS code applied to speed_actual/speed_standby, default RPM (attribute 44).

speed_ref_data_units: CIPAttribute[bytes]#

ENGUNITS code applied to speed_ref/max_rated_speed/low_speed_limit/high_speed_limit, default RPM (attribute 45).

drive_on_hours: CIPAttribute[int]#

Number of hours speed_actual has been > 0; does not roll over (attribute 46).

get_class_attribute(attribute: int) bytes[source]#

Read an AC/DC Drive class attribute from instance 0 (See §5-30.1).

restore() bytes[source]#

Invoke Restore, reloading attribute values saved via save().

save() bytes[source]#

Invoke Save, persisting all attribute values to non-volatile storage.

class icspacket.proto.cip.objects.drive.AcknowledgeHandlerObject(connection: CIP_Connection, instance: int = 1)[source]#

Manages reception of message acknowledgments for a producing I/O application (See CIP Vol 1, §5-31).

data_with_ack_path_list (attribute 7) is a list of heterogeneous (Connection Instance, CIP Path Length, CIP Path) tuples and is kept as raw bytes; ack_list (attribute 5) is a homogeneous UINT array with its own leading count, decoded directly.

acknowledge_timer: CIPAttribute[int]#

Time to wait for an acknowledge before resending, Units: ms, range 1-65535, default 16 (attribute 1, required).

retry_limit: CIPAttribute[int]#

Number of ack timeouts to wait before a RetryLimit_Reached event, default 1 (attribute 2).

cos_producing_connection_instance: CIPAttribute[int]#

Connection instance whose producing I/O object is notified of ack events; Set while inactive, Get-only once active (attribute 3, required).

ack_list_size: CIPAttribute[int]#

Maximum number of members in ack_list; 0 = dynamic (attribute 4).

ack_list: CIPAttribute[Collection[int]]#

Active connection instances currently receiving acks (attribute 5).

data_with_ack_path_list_size: CIPAttribute[int]#

Maximum number of members in data_with_ack_path_list; 0 = dynamic (attribute 6).

data_with_ack_path_list: CIPAttribute[bytes]#

List of (Connection Instance, CIP Path Length, CIP Path) used to forward data received with an acknowledgment (attribute 7).

get_class_attribute(attribute: int) bytes[source]#

Read an Acknowledge Handler class attribute from instance 0 (See §5-31.1).

create() bytes[source]#

Invoke Create at the class level, allocating a new Acknowledge Handler instance.

delete_all() bytes[source]#

Invoke Delete at the class level, removing all dynamically created instances.

delete() bytes[source]#

Invoke Delete on this instance.

add_ack_data_path(request_data: bytes) bytes[source]#

Invoke Add_AckData_Path (service 0x4B) with a caller-built (Connection Instance, CIP Path Length, CIP Path) request payload.

remove_ack_data_path(request_data: bytes) bytes[source]#

Invoke Remove_AckData_Path (service 0x4C) with a caller-built Connection Instance request payload.

class icspacket.proto.cip.objects.drive.ControlSupervisorObject(connection: CIP_Connection, instance: int = 1)[source]#

Models the run/stop/fault management state machine shared by motor control devices (See CIP Vol 1, §5-29): the State Transition Diagram and State Event Matrix (§5-29.5) govern how run1/run2/net_ctrl/fault_reset drive state.

num_attr: CIPAttribute[int]#

Number of attributes supported (attribute 1).

attributes: CIPAttribute[Collection[int]]#

List of attribute IDs supported by this instance (attribute 2).

run1: CIPAttribute[int]#

Run/Stop command 1 (attribute 3, required, See Run/Stop Event Matrix).

run2: CIPAttribute[int]#

Run/Stop command 2 (attribute 4, See Run/Stop Event Matrix).

net_ctrl: CIPAttribute[int]#

Requests Run/Stop control to be local (0) or from the network (1) (attribute 5).

state: CIPAttribute[int]#

0=Vendor Specific, 1=Startup, 2=Not_Ready, 3=Ready, 4=Enabled, 5=Stopping, 6=Fault_Stop, 7=Faulted (attribute 6).

running1: CIPAttribute[int]#

1 if (Enabled|Stopping|Fault_Stop) and Running1, else 0 (attribute 7).

running2: CIPAttribute[int]#

1 if (Enabled|Stopping|Fault_Stop) and Running2, else 0 (attribute 8).

ready: CIPAttribute[int]#

1 if Ready, Enabled, or Stopping, else 0 (attribute 9).

faulted: CIPAttribute[int]#

1 if a fault has occurred (latched), else 0 (attribute 10).

warning: CIPAttribute[int]#

1 if a warning is present (not latched), else 0 (attribute 11).

fault_reset: CIPAttribute[int]#

0->1 transition requests a Fault Reset (attribute 12).

fault_code: CIPAttribute[int]#

Code identifying the fault that caused/last caused a transition to Faulted (attribute 13).

warn_code: CIPAttribute[int]#

Code identifying the lowest-numbered warning currently present (attribute 14).

ctrl_from_net: CIPAttribute[int]#

Status of Run/Stop control source: 0=local, 1=network (attribute 15).

net_fault_mode: CIPAttribute[int]#

Action on loss of CIP Network: 0=Fault+Stop, 1=Ignore, 2=Vendor specific (attribute 16).

force_fault: CIPAttribute[int]#

0->1 transition forces a fault/trip (attribute 17).

force_status: CIPAttribute[int]#

0 = not forced, nonzero = forced (attribute 18).

delay: CIPAttribute[int]#

ITIME delay (ms) before a fault/idle mode action takes effect (attribute 19).

net_idle_mode: CIPAttribute[int]#

Mode on reception of a CIP communication IDLE event (attribute 20, See Table 5-29.3).

protect_mode: CIPAttribute[int]#

Mode on detection of a motor protection event (attribute 21, See Table 5-29.3).

cycle_count: CIPAttribute[int]#

Number of motor start operations recorded on the equipment (attribute 22).

fault_warning_code_style: CIPAttribute[int]#

0=device profile default, 1=DRIVECOM (16-bit), 2=Abbreviated (8-bit) (attribute 23).

get_class_attribute(attribute: int) bytes[source]#

Read a Control Supervisor class attribute from instance 0 (See §5-29.1).

reset() bytes[source]#

Invoke Reset, resetting the drive to its start-up state.

class icspacket.proto.cip.objects.drive.MotorDataObject(connection: CIP_Connection, instance: int = 1)[source]#

Database of motor nameplate/rating parameters (See CIP Vol 1, §5-28).

Attributes 6 and above are motor-type specific (AC vs. DC, See §5-28.2.1); both classes of motor share the same wire types for their common attribute IDs, so both are exposed unconditionally here. international_cat_number/international_manufacturer are STRINGI encoded and kept as raw bytes.

num_attr: CIPAttribute[int]#

Number of attributes supported (attribute 1).

attributes: CIPAttribute[Collection[int]]#

List of attribute IDs supported by this instance (attribute 2).

motor_type: CIPAttribute[int]#

0=Non-standard, 1=PM DC, 2=FC DC, 3=PM Synchronous, 6=Wound Rotor Induction, 7=Squirrel Cage Induction, 8=Stepper, …

(attribute 3, required).

cat_number: CIPAttribute[str]#

Manufacturer’s motor catalog (nameplate) number (attribute 4).

manufacturer: CIPAttribute[str]#

Manufacturer’s name (attribute 5).

rated_current: CIPAttribute[int]#

Rated stator (AC) or armature (DC) current, Units: 100mA (attribute 6).

rated_voltage: CIPAttribute[int]#

Rated base (AC) or armature (DC) voltage, Units: V (attribute 7).

rated_power: CIPAttribute[int]#

Rated power at rated frequency/max speed, Units: W (attribute 8).

rated_freq: CIPAttribute[int]#

Rated electrical frequency, Units: Hz; AC motors only (attribute 9).

rated_temp: CIPAttribute[int]#

Rated winding temperature, Units: degrees C (attribute 10).

max_speed: CIPAttribute[int]#

Maximum allowed motor speed, Units: RPM (attribute 11).

pole_count: CIPAttribute[int]#

Number of poles in the motor; AC motors only (attribute 12).

torque_constant: CIPAttribute[int]#

Motor torque constant, Units: 0.001 x Nm/A (attribute 13).

inertia: CIPAttribute[int]#

Rotor inertia, Units: 1e-6 x kg.m^2 (attribute 14).

base_speed: CIPAttribute[int]#

Nominal speed at rated frequency/voltage, Units: RPM (attribute 15).

rated_field_current: CIPAttribute[int]#

Rated field current, Units: mA; DC motors only (attribute 16).

min_field_current: CIPAttribute[int]#

Minimum field current, Units: mA; DC motors only (attribute 17).

rated_field_voltage: CIPAttribute[int]#

Rated field voltage, Units: V; DC motors only (attribute 18).

service_factor: CIPAttribute[int]#

Service factor, Units: %; AC motors only (attribute 19).

international_cat_number: CIPAttribute[bytes]#

STRINGI catalog name/number (attribute 20).

international_manufacturer: CIPAttribute[bytes]#

STRINGI name of the motor manufacturer (attribute 21).

serial_number: CIPAttribute[str]#

Nameplate serial number of the motor (attribute 22).

tag_name: CIPAttribute[str]#

Plant’s tag name for the motor (attribute 23).

supply_style: CIPAttribute[int]#

0 = three phase, 1 = single phase (attribute 24).

time_rating: CIPAttribute[int]#

Maximum continuous operation time, Units: minutes (attribute 25).

inrush_current: CIPAttribute[int]#

Maximum inrush current, Units: 100mA (attribute 26).

locked_rotor_code_letter: CIPAttribute[str]#

NEMA MG-1 Code Letter for Locked Rotor kVA (attribute 27).

design_letter: CIPAttribute[str]#

IEC or NEMA Design Letter (attribute 28).

thermal_protection: CIPAttribute[int]#

TRUE (nonzero) if the motor is marked “Thermally Protected” (attribute 29).

get_class_attribute(attribute: int) bytes[source]#

Read a Motor Data class attribute from instance 0 (See §5-28.1).

restore() bytes[source]#

Invoke Restore, reloading attribute values saved via save().

save() bytes[source]#

Invoke Save, persisting all attribute values to non-volatile storage.

class icspacket.proto.cip.objects.drive.OverloadObject(connection: CIP_Connection, instance: int = 1)[source]#

Models an AC motor overload protection device (See CIP Vol 1, §5-32).

num_attr: CIPAttribute[int]#

Number of attributes supported (attribute 1).

attributes: CIPAttribute[Collection[int]]#

List of attribute IDs supported by this instance (attribute 2).

trip_flc_set: CIPAttribute[int]#

Overload full load current setting, Units: 100mA / 2**current_scale (attribute 3).

trip_class: CIPAttribute[int]#

Trip class setting, range 0-200 (attribute 4).

avg_current: CIPAttribute[int]#

Average of the three phase currents, Units: 100mA / 2**current_scale (attribute 5).

percent_phase_imbalance: CIPAttribute[int]#

Percent phase imbalance (attribute 6).

percent_thermal_capacity: CIPAttribute[int]#

Percent thermal capacity used (attribute 7).

current_l1: CIPAttribute[int]#

Actual motor phase current L1, Units: 100mA / 2**current_scale (attribute 8).

current_l2: CIPAttribute[int]#

Actual motor phase current L2, Units: 100mA / 2**current_scale (attribute 9).

current_l3: CIPAttribute[int]#

Actual motor phase current L3, Units: 100mA / 2**current_scale (attribute 10).

ground_current: CIPAttribute[int]#

Ground current, Units: 100mA / 2**current_scale (attribute 11).

current_scale: CIPAttribute[int]#

Current scaling factor, range -128..127, default 0 (attribute 12).

get_class_attribute(attribute: int) bytes[source]#

Read an Overload class attribute from instance 0 (See §5-32.1).

restore() bytes[source]#

Invoke Restore, reloading attribute values saved via save().

save() bytes[source]#

Invoke Save, persisting all attribute values to non-volatile storage.

class icspacket.proto.cip.objects.drive.SoftstartObject(connection: CIP_Connection, instance: int = 1)[source]#

Models a soft-start motor starter (See CIP Vol 1, §5-33).

num_attr: CIPAttribute[int]#

Number of attributes supported (attribute 1).

attributes: CIPAttribute[Collection[int]]#

List of attribute IDs supported by this instance (attribute 2).

at_reference: CIPAttribute[int]#

0 = not at reference, 1 = output at starting/stopping voltage reference (attribute 3, required).

start_mode: CIPAttribute[int]#

0=No Ramp/No Limit, 1=Voltage Ramp, 2=Current Limit, 3=Ramp+Limit, 10-255=Vendor specific (attribute 4, required).

stop_mode: CIPAttribute[int]#

0=Coast, 1=Ramp Down, 2=Brake, 10-255=Vendor specific (attribute 5).

ramp_mode: CIPAttribute[int]#

0=Single Ramp, 1=Dual Contiguous Ramp, 2=Dual Independent Ramp (attribute 6).

ramp_time1: CIPAttribute[int]#

First ramp duration, Units: tenths of seconds (attribute 7).

initial_voltage1: CIPAttribute[int]#

Starting voltage for the first ramp, Units: % of full line voltage (attribute 8).

ramp_time2: CIPAttribute[int]#

Second ramp duration (Dual Ramp modes), Units: tenths of seconds (attribute 9).

initial_voltage2: CIPAttribute[int]#

Starting voltage for the second ramp, Units: % of full line voltage (attribute 10).

rotation: CIPAttribute[int]#

0 = ABC phase rotation, 1 = CBA phase rotation (attribute 11).

kick_start: CIPAttribute[int]#

Enables (1) or disables (0) fixed-time kick start (attribute 12).

kick_start_time: CIPAttribute[int]#

Kick start duration, Units: tenths of seconds (attribute 13).

kick_start_voltage: CIPAttribute[int]#

Kick start voltage, Units: % of full line voltage (attribute 14).

energy_saver: CIPAttribute[int]#

Enables (1) or disables (0) energy saver mode (attribute 15).

decel_time: CIPAttribute[int]#

Ramp-to-stop/DC-brake duration, Units: tenths of seconds (attribute 16).

current_limit_set: CIPAttribute[int]#

Current limit for starting, Units: % of Motor Data rated_current (attribute 17).

braking_current_set: CIPAttribute[int]#

DC braking current for stopping, Units: % of Motor Data rated_current (attribute 18).

get_class_attribute(attribute: int) bytes[source]#

Read a Softstart class attribute from instance 0 (See §5-33.1).

restore() bytes[source]#

Invoke Restore, reloading attribute values saved via save().

save() bytes[source]#

Invoke Save, persisting all attribute values to non-volatile storage.

[ODVA CIP Vol 1] Wrappers for the “Hierarchy of Semiconductor Equipment Devices” object family:

  • S-Device Supervisor (class 0x30, §5-35),

  • S-Analog Sensor (class 0x31, §5-36),

  • S-Analog Actuator (class 0x32, §5-37),

  • S-Single Stage Controller (class 0x33, §5-38),

  • S-Gas Calibration (class 0x34, §5-39),

  • Trip Point (class 0x35, §5-40),

  • S-Partial Pressure (class 0x38, §5-43), and

  • S-Sensor Calibration (class 0x40, §5-44).

Every object in this family is managed by the S-Device Supervisor Object and shares its “Subclass” extensibility mechanism: instance/class attribute 99 reports whether a subclass is active (0 = none) and, if so, IDs 81-96 (instance) / 96 (class) and downward are redefined by that subclass. Subclass-specific attributes/services (e.g. S-Device Supervisor’s “Power Generator” subclass) are vendor/profile specific and out of scope here, consistent with this library’s treatment of other device-profile extensions.

icspacket.proto.cip.objects.semiconductor.ELEMENTARY_DATA_TYPES: dict[int, Any] = {194: <int8>, 195: <int16>, 196: <int32>, 197: <int64>, 198: <int8>, 199: <int16>, 200: <int32>, 201: <int64>, 202: <float32>, 203: <float64>}#

CIP Elementary Data Type code (Appendix C-6.1, Table C-6.1) -> wire schema. Used by the S-Analog Sensor/Actuator and S-Single Stage Controller “Data Type”/”Gain Data Type”/”CV Data Type” attributes to select the wire type of their Data-Type-dependent companion attributes. Only the numeric elementary types are mapped; BOOL and non-numeric types (STRING, BYTE/WORD/…, STIME/DATE/…) have no fixed numeric meaning here and decode to raw bytes.

class icspacket.proto.cip.objects.semiconductor.CIPDateAndTime(time_of_day: int, date: int)[source]#

CIP DATE_AND_TIME value (See CIP Vol 1, Appendix C, C-6.2).

time_of_day: int#

Milliseconds since midnight.

date: int#

Days since 1972-01-01.

class icspacket.proto.cip.objects.semiconductor.CreateRangeRequest(start_amu: float, end_amu: float, num_instances: int, starting_id: int, group_id: int)[source]#

Create_Range (0x4B) request parameters (See §5-43.4.1, Table 5-43.9).

starting_id: int#

First instance ID to create; 0 = use next available.

group_id: int#

Group value assigned to the created instances.

class icspacket.proto.cip.objects.semiconductor.CreateRangeResult(starting_id: int, ending_id: int)[source]#

Create_Range (0x4B) success response (See §5-43.4.1, Table 5-43.10).

class icspacket.proto.cip.objects.semiconductor.FullScale(amount: float, units: int)[source]#

Full Scale amount + ENGUNITS code pair, shared by the S-Gas Calibration and S-Sensor Calibration objects’ full_scale attribute (See §5-39.2/§5-44.3, Table 5-39.2/5-44.2).

amount: float#

The amount of measured parameter corresponding to full scale.

units: int#

ENGUNITS code for amount (See Appendix D).

class icspacket.proto.cip.objects.semiconductor.GasCalibrationEntry(instance_id: int, gas_standard_number: int, valid_sensor_instance: int)[source]#

One S-Gas Calibration Get_All_Instances response element (See §5-39.5, Table 5-39.5).

class icspacket.proto.cip.objects.semiconductor.GroupEnableRequest(enable: int, group_id: int)[source]#

Group_Enable (0x4F) request parameters (See §5-43.4.5, Table 5-43.14).

enable: int#

0 = Disable, 1 = Enable.

group_id: int#

Affects every instance whose group_id attribute has this value.

class icspacket.proto.cip.objects.semiconductor.PartialPressureInstanceEntry(instance_number: int, instance_type: int, amu: float, ending_amu: float, gas_standard_number: int)[source]#

One S-Partial Pressure Get_Instance_List response element (See §5-43.4.2, Table 5-43.11).

class icspacket.proto.cip.objects.semiconductor.PartialPressureReading(instance_id: int, partial_pressure: float)[source]#

One Get_Pressures/Get_All_Pressures response element (See §5-43.4.3/ §5-43.4.4, Table 5-43.12/5-43.13).

class icspacket.proto.cip.objects.semiconductor.SAnalogActuatorObject(connection: CIP_Connection, instance: int = 1)[source]#

Models an analog actuator drive signal in the Hierarchy of Semiconductor Equipment Devices (See CIP Vol 1, §5-37).

ZERO corresponds to the powered-off/not-actuated state, which may or may not equal the physically de-energized position depending on device wiring. value and its related attributes are all “INT or specified by Data Type” and, as with SAnalogSensorObject, are exposed as raw bytes with read_value()/write_value() provided for value itself. This object has no object-specific services; its behavior is entirely managed by SDeviceSupervisorObject.

number_of_attributes: CIPAttribute[int]#

Number of attributes supported by this object instance (attribute 1).

attribute_list: CIPAttribute[Collection[int]]#

List of attributes supported by this object instance (attribute 2).

data_type: CIPAttribute[int]#

Appendix C-6.1 code selecting the wire type of value and related attributes; settable only in the Idle state (attribute 3).

data_units: CIPAttribute[bytes]#

ENGUNITS context of value, settable only in the Idle state (attribute 4, See Appendix D).

override: CIPAttribute[int]#

0=normal [default]; any other value overrides the physical actuator and value is ignored (attribute 5, required).

value: CIPAttribute[bytes]#

The uncorrected analog output value, default 0 (attribute 6, required).

status: CIPAttribute[int]#

Alarm/Warning state of this object instance, default 0 (attribute 7, required).

alarm_enable: CIPAttribute[int]#

Enables setting the alarm status bit, default disabled (attribute 8).

warning_enable: CIPAttribute[int]#

Enables setting the warning status bit, default disabled (attribute 9).

offset: CIPAttribute[bytes]#

Amount added to Value prior to the application of gain, default 0 (attribute 10).

bias: CIPAttribute[bytes]#

Amount added to Value after the application of gain, default 0 (attribute 11).

gain_data_type: CIPAttribute[int]#

Appendix C-6.1 code for gain/unity_gain_reference, required if gain is not REAL (attribute 12).

gain: CIPAttribute[bytes]#

Scales Value prior to driving the physical actuator; REAL unless gain_data_type says otherwise, default 1.0 (attribute 13).

unity_gain_reference: CIPAttribute[bytes]#

Value of gain equivalent to a gain of 1.0, default 1.0 (attribute 14).

alarm_trip_point_high: CIPAttribute[bytes]#

Value above which an Alarm occurs, default = max for the data type (attribute 15).

alarm_trip_point_low: CIPAttribute[bytes]#

Value below which an Alarm occurs, default = min for the data type (attribute 16).

alarm_hysteresis: CIPAttribute[bytes]#

Recovery margin to clear an Alarm condition, default 0 (attribute 17).

warning_trip_point_high: CIPAttribute[bytes]#

Value above which a Warning occurs, default = max for the data type (attribute 18).

warning_trip_point_low: CIPAttribute[bytes]#

Value below which a Warning occurs, default = min for the data type (attribute 19).

warning_hysteresis: CIPAttribute[bytes]#

Recovery margin to clear a Warning condition, default 0 (attribute 20).

safe_state: CIPAttribute[int]#

Behavior for states other than Execute, default 0 (attribute 21).

safe_value: CIPAttribute[bytes]#

Value used for safe_state = Use Safe Value, default 0 (attribute 22).

subclass: CIPAttribute[int]#

0=No subclass (attribute 99).

read_value() int | float | bytes[source]#

Read and decode value according to the current data_type.

write_value(value: int | float | bytes) bytes[source]#

Encode and write value according to the current data_type.

class icspacket.proto.cip.objects.semiconductor.SAnalogSensorObject(connection: CIP_Connection, instance: int = 1)[source]#

Models an analog sensor reading in the Hierarchy of Semiconductor Equipment Devices (See CIP Vol 1, §5-36).

value and its related attributes (full_scale, offset_a, offset_b, gain, unity_gain_reference, the alarm/warning trip points and hysteresis, safe_value, overrange, underrange and produce_trigger_delta) are all “INT or specified by Data Type” - their wire type is only known at runtime from data_type/offset_a_data_type/gain_data_type, so they are exposed as raw bytes; use decode_elementary_value()/ encode_elementary_value() (or read_value()/ write_value() for value itself) once the relevant Data Type attribute is known.

number_of_attributes: CIPAttribute[int]#

Number of attributes supported by this object instance (attribute 1).

attribute_list: CIPAttribute[Collection[int]]#

List of attributes supported by this object instance (attribute 2).

data_type: CIPAttribute[int]#

Appendix C-6.1 code selecting the wire type of value and related attributes; settable only in the Idle state (attribute 3).

data_units: CIPAttribute[bytes]#

ENGUNITS context of value and related attributes, settable only in the Idle state (attribute 4, See Appendix D).

reading_valid: CIPAttribute[int]#

0=Value is valid, 1=invalid (attribute 5).

value: CIPAttribute[bytes]#

The corrected sensor reading: Value = Gain * (Sensor Reading + Offset-A) + Offset-B (attribute 6, required).

status: CIPAttribute[int]#

Bit 0=High Alarm, 1=Low Alarm, 2=High Warning, 3=Low Warning (attribute 7, required).

alarm_enable: CIPAttribute[int]#

Enables setting the alarm status bits (attribute 8).

warning_enable: CIPAttribute[int]#

Enables setting the warning status bits (attribute 9).

full_scale: CIPAttribute[bytes]#

The full-scale value, in the same data type/units as value (attribute 10).

offset_a_data_type: CIPAttribute[int]#

Appendix C-6.1 code for offset_a, if it is not the same type as value (attribute 11).

offset_a: CIPAttribute[bytes]#

Amount added to the raw sensor reading before gain is applied (attribute 12).

gain_data_type: CIPAttribute[int]#

Appendix C-6.1 code for gain/unity_gain_reference, required if gain is not REAL (attribute 13).

gain: CIPAttribute[bytes]#

Multiplier applied to (Sensor Reading + Offset-A); REAL unless gain_data_type says otherwise, default 1.0 (attribute 14).

unity_gain_reference: CIPAttribute[bytes]#

Value of gain equivalent to a gain of 1.0, used to normalize it (attribute 15).

offset_b: CIPAttribute[bytes]#

Amount added to Value after gain is applied, default 0 (attribute 16).

alarm_trip_point_high: CIPAttribute[bytes]#

Value above which a High Alarm occurs, default = max for the data type (attribute 17).

alarm_trip_point_low: CIPAttribute[bytes]#

Value below which a Low Alarm occurs, default = min for the data type (attribute 18).

alarm_hysteresis: CIPAttribute[bytes]#

Recovery margin to clear an Alarm condition, default 0 (attribute 19).

alarm_settling_time: CIPAttribute[int]#

Milliseconds a trip condition must persist before the Alarm bit is set (attribute 20).

warning_trip_point_high: CIPAttribute[bytes]#

Value above which a High Warning occurs (attribute 21).

warning_trip_point_low: CIPAttribute[bytes]#

Value below which a Low Warning occurs (attribute 22).

warning_hysteresis: CIPAttribute[bytes]#

Recovery margin to clear a Warning condition, default 0 (attribute 23).

warning_settling_time: CIPAttribute[int]#

Milliseconds a trip condition must persist before the Warning bit is set (attribute 24).

safe_state: CIPAttribute[int]#

Behavior for states other than Executing, default 0 (attribute 25).

safe_value: CIPAttribute[bytes]#

Value used for safe_state = Use Safe Value, default 0 (attribute 26).

autozero_enable: CIPAttribute[int]#

Enables an automatic zero-adjust cycle (attribute 27).

autozero_status: CIPAttribute[int]#

Status of the autozero_enable cycle (attribute 28).

autorange_enable: CIPAttribute[int]#

Enables automatic range selection (attribute 29).

range_multiplier: CIPAttribute[float]#

Current multiplier applied by the autorange_enable mechanism (attribute 30).

averaging_time: CIPAttribute[int]#

Milliseconds over which readings are averaged (attribute 31).

overrange: CIPAttribute[bytes]#

Value above which Reading Valid is set to invalid, default = max for the data type (attribute 32).

underrange: CIPAttribute[bytes]#

Value below which Reading Valid is set to invalid, default = min for the data type (attribute 33).

produce_trigger_delta: CIPAttribute[bytes]#

Change in Value required to trigger a Change-of-State production; 0 = disabled (attribute 34).

calibration_object_instance: CIPAttribute[int]#

S-Sensor Calibration object instance active for this instance; 0 = disabled (attribute 35).

produce_trigger_delta_type: CIPAttribute[int]#

Appendix C-6.1 code for produce_trigger_delta, if not the same type as value (attribute 36).

value_descriptor: CIPAttribute[str]#

User defined name of the sensed parameter, max 20 characters (attribute 37).

subclass: CIPAttribute[int]#

0=No subclass, 1=Flow Diagnostics, 2=Heat Transfer Vacuum Gauge, 3=Capacitance Manometer, 4=Cold Cathode Ion Gauge, 5=Hot Cathode Ion Gauge, 6=Transfer Function (attribute 99).

read_value() int | float | bytes[source]#

Read and decode value according to the current data_type.

write_value(value: int | float | bytes) bytes[source]#

Encode and write value according to the current data_type.

zero_adjust(target_value: int | float | bytes = 0) bytes[source]#

Invoke Zero_Adjust (0x4B): asks the device to modify Offset-A and/or Offset-B so that value equals target_value, encoded per data_type (default 0, See §5-36.5.1).

gain_adjust(target_value: int | float | bytes) bytes[source]#

Invoke Gain_Adjust (0x4C): asks the device to modify gain so that value equals target_value, encoded per data_type (See §5-36.5.1).

class icspacket.proto.cip.objects.semiconductor.SDeviceSupervisorObject(connection: CIP_Connection, instance: int = 1)[source]#

Manages application object state, exceptions and behavior shared by every object in the Hierarchy of Semiconductor Equipment Devices (See CIP Vol 1, §5-35).

Class attr 1 (Revision, fixed at 2) and class attr 99 (Subclass) are available via get_class_attribute(). exception_detail_alarm/ exception_detail_warning (attributes 13/14) are each a STRUCT of three (Size:USINT, Detail:BYTE[Size]) sub-structures - Common, Device-specific and Manufacturer-specific - and are kept as raw bytes due to that nested variable-length shape.

number_of_attributes: CIPAttribute[int]#

Number of attributes supported by the object instance (attribute 1).

attribute_list: CIPAttribute[Collection[int]]#

List of attributes supported by the object instance (attribute 2).

device_type: CIPAttribute[str]#

Specific Device Model within the SEMI S/A hierarchy, max 8 characters (attribute 3, required).

semi_standard_revision_level: CIPAttribute[str]#

SEMI S/A Network Standard revision, e.g. "E54-0997" (attribute 4, required).

manufacturer_name: CIPAttribute[str]#

Max 20 characters (attribute 5, required).

manufacturer_model_number: CIPAttribute[str]#

Max 20 characters, manufacturer specified (attribute 6, required).

software_revision_level: CIPAttribute[str]#

Max 6 characters (attribute 7, required).

hardware_revision_level: CIPAttribute[str]#

Max 6 characters (attribute 8, required).

manufacturer_serial_number: CIPAttribute[str]#

Max 30 characters, manufacturer specified (attribute 9).

device_configuration: CIPAttribute[str]#

Max 50 characters, manufacturer specified free-form configuration info (attribute 10).

device_status: CIPAttribute[int]#

0=Undefined, 1=Self Testing, 2=Idle, 3=Self-Test Exception, 4=Executing, 5=Abort, 6=Critical Fault, 51-99=Device Specific, 100-255=Vendor Specific (attribute 11, required).

exception_status: CIPAttribute[int]#

Bit 7=0: Basic method, device/profile specific bits 0-6.

Bit 7=1: Expanded method - bit 0=common alarm, 1=device alarm, 2=mfg alarm, 4=common warning, 5=device warning, 6=mfg warning (attribute 12, required).

exception_detail_alarm: CIPAttribute[bytes]#

Common/Device/Manufacturer alarm detail bitmaps; present only if Expanded method and exception_status bit 7 conditions apply (attribute 13).

exception_detail_warning: CIPAttribute[bytes]#

Common/Device/Manufacturer warning detail bitmaps, same shape as exception_detail_alarm (attribute 14).

alarm_enable: CIPAttribute[int]#

Enables alarm exception reporting (attribute 15, required).

warning_enable: CIPAttribute[int]#

Enables warning exception reporting (attribute 16, required).

time: CIPAttribute[CIPDateAndTime]#

The device’s internal realtime clock (attribute 17).

clock_power_cycle_behavior: CIPAttribute[int]#

0=clock always resets on power cycle [default], 1=stored in NV memory at power down, 2=battery-backed and free-running (attribute 18).

last_maintenance_date: CIPAttribute[int]#

DATE the device was last serviced (attribute 19).

next_scheduled_maintenance_date: CIPAttribute[int]#

DATE the device should next be serviced (attribute 20).

scheduled_maintenance_expiration_timer: CIPAttribute[int]#

Countdown to the next scheduled maintenance (attribute 21).

scheduled_maintenance_expiration_warning_enable: CIPAttribute[int]#

Enables a warning when scheduled_maintenance_expiration_timer expires; required if Calibration Expiration is supported (attribute 22).

run_hours: CIPAttribute[int]#

Hours the device has had power applied, resolution 1 hour, stored in NV memory (attribute 23).

endpoint: CIPAttribute[int]#

0=Endpoint not obtained, 1=Endpoint obtained by the current recipe step’s algorithm (attribute 24).

recipe: CIPAttribute[int]#

Selects the endpoint algorithm to use (attribute 25).

subclass: CIPAttribute[int]#

0=No subclass, 1=Power Generator (attribute 99).

get_class_attribute(attribute: int) bytes[source]#

Read an S-Device Supervisor class attribute from instance 0 (See §5-35.1).

reset() bytes[source]#

Invoke Reset, returning the device to the Self-Testing state (See §5-35.4).

start() bytes[source]#

Invoke Start, moving the device to the Executing state (See §5-35.4).

stop() bytes[source]#

Invoke Stop, moving the device to the Idle state (optional, See §5-35.4).

abort() bytes[source]#

Invoke Abort (0x4B), moving the device to the Abort state (See §5-35.5.1).

recover() bytes[source]#

Invoke Recover (0x4C), moving the device out of the Abort state to Idle (See §5-35.5.2).

perform_diagnostics(test_id: int = 0) bytes[source]#

Invoke Perform_Diagnostics (0x4E): 0=Standard, 64-127=Device Specific, 128-255=Manufacturer Specific.

Response shape is implementation-specific and returned unmodified (See §5-35.5.3).

class icspacket.proto.cip.objects.semiconductor.SGasCalibrationObject(connection: CIP_Connection, instance: int = 1)[source]#

Holds calibration parameters for one gas type of an associated S-Analog Sensor object (selected via that object’s calibration_object_instance attribute) (See CIP Vol 1, §5-39).

Instances typically add manufacturer specific calibration parameters at attribute IDs > 100.

number_of_attributes: CIPAttribute[int]#

Number of attributes supported (attribute 1).

attribute_list: CIPAttribute[Collection[int]]#

List of attributes supported by this object instance (attribute 2).

gas_standard_number: CIPAttribute[int]#

SEMI E52 Gas Type Number; 0 = no gas type specified [default] (attribute 3, required).

valid_sensor_instance: CIPAttribute[int]#

S-Analog Sensor object instance ID this instance is valid for; 0 = none [default] (attribute 4, required).

gas_symbol: CIPAttribute[str]#

Gas type name, e.g. "N2" (attribute 5).

full_scale: CIPAttribute[FullScale]#

Full Scale of the device using this instance, default (0, 0) (attribute 6).

additional_scaler: CIPAttribute[float]#

Extra correction factor multiplied to the reading, e.g. to reuse this calibration for a different gas; default 1.0 (attribute 7).

calibration_date: CIPAttribute[int]#

DATE this instance was last calibrated, default 0 (attribute 8).

calibration_gas_number: CIPAttribute[int]#

Gas number used to calibrate this instance, default 0 (attribute 9).

gas_correction_factor: CIPAttribute[float]#

Simple correction factor alternative to a full algorithm, default 1.0 (attribute 10).

subclass: CIPAttribute[int]#

0=No subclass, 1=Standard T & P (attribute 99).

get_all_instances() Collection[GasCalibrationEntry][source]#

Invoke the class-level Get_All_Instances (0x4B): lists every instance with its Gas Standard Number and valid sensor instance (See §5-39.5).

class icspacket.proto.cip.objects.semiconductor.SPartialPressureObject(connection: CIP_Connection, instance: int = 1)[source]#

Scans the partial pressure of one configured AMU, AMU range or gas species, e.g. for a mass spectrometer (See CIP Vol 1, §5-43).

Class attributes 32-39 (Filament Control/Status, Reading Invalid, Emission Current, Multiplier On/Voltage, Samples, Scan Count) are only available via get_class_attribute()/set_class_attribute(), per this library’s convention of never declaring typed descriptors for class-level attributes.

number_of_attributes: CIPAttribute[int]#

Number of attributes supported by this object instance (attribute 1).

attribute_list: CIPAttribute[Collection[int]]#

List of attributes supported by this object instance (attribute 2).

instance_type: CIPAttribute[int]#

0=AMU [default], 1=AMU Range, 2=Gas Species, 51-99=Device Specific, 100-255=Vendor Specific (attribute 3, required).

amu: CIPAttribute[float]#

Atomic Mass Unit, or Starting AMU for an AMU Range instance, default 0 (attribute 4).

ending_amu: CIPAttribute[float]#

Ending AMU for an AMU Range type instance (attribute 5).

gas_standard_number: CIPAttribute[int]#

SEMI E52 Gas Species Type Number; 0 = none specified [default] (attribute 6).

status: CIPAttribute[int]#

Alarm and Warning state of this object instance (attribute 7, required).

alarm_high_enable: CIPAttribute[int]#

Enables setting the Alarm High status bit, default disabled (attribute 8).

alarm_low_enable: CIPAttribute[int]#

Enables setting the Alarm Low status bit, default disabled (attribute 9).

warning_high_enable: CIPAttribute[int]#

Enables setting the Warning High status bit, default disabled (attribute 10).

warning_low_enable: CIPAttribute[int]#

Enables setting the Warning Low status bit, default disabled (attribute 11).

instance_enable: CIPAttribute[int]#

0=disable [default], 1=normal scan rate, 2=double scan rate, 51-99=Device Specific, 100-255=Vendor Specific (attribute 12, required).

partial_pressure: CIPAttribute[float]#

The measured partial pressure of the specified AMU, in pressure_units (attribute 13, required).

pressure_units: CIPAttribute[bytes]#

ENGUNITS context of partial_pressure; default = Torr (attribute 14, See Appendix D).

dwell_time: CIPAttribute[int]#

Milliseconds of acquisition time for this AMU; 0 = fastest possible [default] (attribute 15).

electron_energy: CIPAttribute[float]#

Electron Impact Ionization Voltage in eV, default factory configured (attribute 16).

report_threshold: CIPAttribute[float]#

Level above which partial_pressure is reported by Get_Pressures, default 0 (attribute 17).

alarm_trip_point_high: CIPAttribute[float]#

Value above which an Alarm occurs, default = max for its data type (attribute 18).

alarm_trip_point_low: CIPAttribute[float]#

Value below which an Alarm occurs, default = min for its data type (attribute 19).

alarm_hysteresis: CIPAttribute[float]#

Recovery margin to clear an Alarm condition, default 0 (attribute 20).

warning_trip_point_high: CIPAttribute[float]#

Value above which a Warning occurs, default = max for its data type (attribute 21).

warning_trip_point_low: CIPAttribute[float]#

Value below which a Warning occurs, default = min for its data type (attribute 22).

warning_hysteresis: CIPAttribute[float]#

Recovery margin to clear a Warning condition, default 0 (attribute 23).

group_id: CIPAttribute[int]#

Group (0-255) this instance belongs to, for Group_Enable (attribute 24).

subclass: CIPAttribute[int]#

0=No Subclass (attribute 99).

get_class_attribute(attribute: int) bytes[source]#

Read an S-Partial Pressure class attribute from instance 0, e.g. Filament Status (33) or Reading Invalid (34) (See §5-43.1).

set_class_attribute(attribute: int, value: bytes) bytes[source]#

Write an S-Partial Pressure class attribute at instance 0, e.g. Filament Control (32) (See §5-43.1).

create() bytes[source]#

Invoke Create at the class level, allocating a new S-Partial Pressure instance (See §5-43.3).

delete_all() bytes[source]#

Invoke Delete at the class level, removing every instance (See §5-43.3).

delete() bytes[source]#

Invoke Delete on this instance (See §5-43.3).

create_range(start_amu: float, end_amu: float, num_instances: int, starting_id: int = 0, group_id: int = 0) CreateRangeResult[source]#

Invoke the class-level Create_Range (0x4B): creates num_instances evenly spaced instances covering start_amu to end_amu. starting_id = 0 uses the first available contiguous ID range (See §5-43.4.1).

get_instance_list() Collection[PartialPressureInstanceEntry][source]#

Invoke the class-level Get_Instance_List (0x4C): lists every enabled instance with its AMU configuration (See §5-43.4.2).

get_pressures() Collection[PartialPressureReading][source]#

Invoke the class-level Get_Pressures (0x4D): lists every enabled Partial Pressure above its report_threshold (See §5-43.4.3).

get_all_pressures() Collection[PartialPressureReading][source]#

Invoke the class-level Get_All_Pressures (0x4E): lists every enabled Partial Pressure, irrespective of report_threshold (See §5-43.4.4).

group_enable(enable: bool, group_id: int) bytes[source]#

Invoke the class-level Group_Enable (0x4F): enables/disables every instance whose group_id attribute matches (See §5-43.4.5).

class icspacket.proto.cip.objects.semiconductor.SSensorCalibrationObject(connection: CIP_Connection, instance: int = 1)[source]#

Holds calibration parameters for one application of an associated S-Analog Sensor object (selected via that object’s calibration_object_instance attribute) (See CIP Vol 1, §5-44).

Attributes 16-31 are reserved for manufacturer defined calibration coefficients and are not modeled individually; use get()/ set() with the desired attribute ID if a device implements them.

number_of_attributes: CIPAttribute[int]#

Number of attributes supported (attribute 1).

attribute_list: CIPAttribute[Collection[int]]#

List of attributes supported by this object instance (attribute 2).

calibration_id_number: CIPAttribute[int]#

Identifies the calibration, e.g. fluid type; default 0 (attribute 3, required).

valid_sensor_instance: CIPAttribute[int]#

S-Analog Sensor object instance ID this instance is valid for; 0 = none [default] (attribute 4, required).

calibration_name: CIPAttribute[str]#

Representation of the calibration, e.g. material type, max 50 characters (attribute 5).

full_scale: CIPAttribute[FullScale]#

Full Scale of the device using this instance, default (0, 0) (attribute 6).

additional_scaler: CIPAttribute[float]#

Extra correction factor multiplied to the reading, default 1.0 (attribute 7).

calibration_date: CIPAttribute[int]#

DATE this instance was last calibrated, default 0 (attribute 8).

temperature_data_units: CIPAttribute[bytes]#

ENGUNITS context of temperature (attribute 9).

temperature: CIPAttribute[float]#

Temperature this calibration was made for/at (attribute 10).

pressure_data_units: CIPAttribute[bytes]#

ENGUNITS context of pressure (attribute 11).

pressure: CIPAttribute[float]#

Pressure this calibration was made for/at (attribute 12).

coefficient_a: CIPAttribute[float]#

The “a” term in the quadratic correction y = ax^2 + bx + c (attribute 13).

coefficient_b: CIPAttribute[float]#

The “b” term in the quadratic correction y = ax^2 + bx + c (attribute 14).

coefficient_c: CIPAttribute[float]#

The “c” term in the quadratic correction y = ax^2 + bx + c (attribute 15).

subclass: CIPAttribute[int]#

0=No subclass (attribute 99).

get_all_instances() Collection[SensorCalibrationEntry][source]#

Invoke the class-level Get_All_Instances (0x4B): lists every instance with its Calibration ID Number and valid sensor instance (See §5-44.7).

class icspacket.proto.cip.objects.semiconductor.SSingleStageControllerObject(connection: CIP_Connection, instance: int = 1)[source]#

Models a closed-loop controller (Setpoint / Process Variable / Control Variable) in the Hierarchy of Semiconductor Equipment Devices (See CIP Vol 1, §5-38): Process Variable = Setpoint, achieved by driving control_variable.

setpoint/process_variable (data_type-dependent) and control_variable (cv_data_type-dependent, Get-only) are exposed as raw bytes with dedicated decode/encode helpers; alarm_error_band/ warning_error_band/safe_value share setpoint’s data type but are secondary and stay raw. This object has no object-specific services.

number_of_attributes: CIPAttribute[int]#

Number of attributes supported in this object instance (attribute 1).

attribute_list: CIPAttribute[Collection[int]]#

List of attributes supported in this object instance (attribute 2).

data_type: CIPAttribute[int]#

Appendix C-6.1 code selecting the wire type of setpoint/ process_variable and related attributes (attribute 3).

data_units: CIPAttribute[bytes]#

ENGUNITS context of setpoint/process_variable (attribute 4, See Appendix D).

control_mode: CIPAttribute[int]#

0=Normal [default], 1=Zero/Off/Closed, 2=Full/On/Open, 3=Hold, 4=Safe State, 64-127=Device Specific, 128-255=Vendor Specific (attribute 5).

setpoint: CIPAttribute[bytes]#

The desired value for process_variable, default 0 (attribute 6, required).

process_variable: CIPAttribute[bytes]#

The measured process parameter; required unless this device has no internal sensor, default 0 (attribute 7).

cv_data_type: CIPAttribute[int]#

Appendix C-6.1 code selecting the wire type of control_variable (attribute 8).

control_variable: CIPAttribute[bytes]#

The controller’s drive signal output; required unless this device has no internal actuator, default 0 (attribute 9).

status: CIPAttribute[int]#

Bit 0=Alarm Exception, 1=Warning Exception, default 0 (attribute 10, required).

alarm_enable: CIPAttribute[int]#

Enables setting the Alarm status bit (attribute 11).

warning_enable: CIPAttribute[int]#

Enables setting the Warning status bit (attribute 12).

alarm_settling_time: CIPAttribute[int]#

Milliseconds allowed for the control loop to settle within alarm_error_band, default 0 (attribute 13).

alarm_error_band: CIPAttribute[bytes]#

Allowed Setpoint/Process Variable deviation before an Alarm timer starts, default 0 (attribute 14).

warning_settling_time: CIPAttribute[int]#

Milliseconds allowed for the control loop to settle within warning_error_band, default 0 (attribute 15).

warning_error_band: CIPAttribute[bytes]#

Allowed Setpoint/Process Variable deviation before a Warning timer starts, default 0 (attribute 16).

safe_state: CIPAttribute[int]#

Behavior for states other than Executing, default 0 (attribute 17).

safe_value: CIPAttribute[bytes]#

Value used for safe_state = Use Safe Value, default 0 (attribute 18).

ramp_rate: CIPAttribute[int]#

Milliseconds to reach Setpoint; 0 = disabled [default] (attribute 19).

subclass: CIPAttribute[int]#

0=No subclass, 1=PID & Source Select, 2=DC Generator, 3=RF Generator, 4=Frequency Control (attribute 99).

read_setpoint() int | float | bytes[source]#

Read and decode setpoint according to the current data_type.

write_setpoint(value: int | float | bytes) bytes[source]#

Encode and write setpoint according to the current data_type.

read_process_variable() int | float | bytes[source]#

Read and decode process_variable according to the current data_type.

write_process_variable(value: int | float | bytes) bytes[source]#

Encode and write process_variable according to the current data_type.

read_control_variable() int | float | bytes[source]#

Read and decode control_variable according to the current cv_data_type.

class icspacket.proto.cip.objects.semiconductor.SensorCalibrationEntry(instance_id: int, calibration_id_number: int, valid_sensor_instance: int)[source]#

One S-Sensor Calibration Get_All_Instances response element (See §5-44.7.2, Table 5-44.5).

class icspacket.proto.cip.objects.semiconductor.TripPointObject(connection: CIP_Connection, instance: int = 1)[source]#

Compares a Source input value to High/Low trip points and drives a Destination output accordingly, e.g. to model a discrete alarm output derived from an analog input (See CIP Vol 1, §5-40).

high_trip_point/low_trip_point/hysteresis/input are all “INT or based on Data Type attribute” and are exposed as raw bytes; input gets read_input()/write_input() decode helpers since it is this object’s primary measured value. source/ destination are bare (whole-payload) Packed EPATHs identifying the attributes that feed Input and receive Output, respectively.

number_of_attributes: CIPAttribute[int]#

Number of attributes supported (attribute 1).

attribute_list: CIPAttribute[Collection[int]]#

List of attributes supported by this object instance (attribute 2).

high_trip_point: CIPAttribute[bytes]#

Value at or above which a trip condition occurs; at least one of high_trip_point/low_trip_point is required, default 0 (attribute 3).

high_trip_enable: CIPAttribute[int]#

Enables the High Trip Point setting, default enabled (attribute 4).

low_trip_point: CIPAttribute[bytes]#

Value at or below which a trip condition occurs; at least one of high_trip_point/low_trip_point is required, default 0 (attribute 5).

low_trip_enable: CIPAttribute[int]#

Enables the Low Trip Point setting, default enabled (attribute 6).

status: CIPAttribute[int]#

0=trip condition unasserted, 1=asserted (attribute 7, required).

polarity: CIPAttribute[int]#

0=Normal (Output = Status), 1=Reverse (Output = Status inverted) (attribute 8).

override: CIPAttribute[int]#

0=Normal, 1=Force FALSE, 2=Force TRUE, 3=Freeze Status and Output; may also be set internally by the device (attribute 9).

hysteresis: CIPAttribute[bytes]#

Recovery margin the Input must cross to clear a trip condition, same data type as the trip points, default 0 (attribute 10).

delay: CIPAttribute[int]#

Milliseconds a trip condition must exist before being reported in Status, default 0 (attribute 11).

destination: CIPAttribute[EPATH]#

Path of the destination attribute that Output is written to (attribute 12, required).

output: CIPAttribute[int]#

Status as a function of Polarity (attribute 13, required).

source: CIPAttribute[EPATH]#

Path of the source attribute that Input is read from (attribute 14, required).

input: CIPAttribute[bytes]#

Value retrieved from Source and compared to the trip points (attribute 15, required).

data_units: CIPAttribute[bytes]#

ENGUNITS context of Input/trip points/Hysteresis, mirrors the source attribute’s units (attribute 16).

data_type: CIPAttribute[int]#

Appendix C-6.1 code for Input/trip points/Hysteresis; default = INT (attribute 17).

subclass: CIPAttribute[int]#

0=No subclass (attribute 99).

read_input() int | float | bytes[source]#

Read and decode input according to the current data_type.

write_input(value: int | float | bytes) bytes[source]#

Encode and write input according to the current data_type.

icspacket.proto.cip.objects.semiconductor.decode_elementary_value(data: bytes, data_type: int) int | float | bytes[source]#

Decode a Data-Type-dependent attribute payload using its companion Data Type attribute’s Appendix C-6.1 code.

icspacket.proto.cip.objects.semiconductor.encode_elementary_value(value: int | float | bytes, data_type: int) bytes[source]#

Encode a Data-Type-dependent attribute payload using its companion Data Type attribute’s Appendix C-6.1 code.