<< Click to Display Table of Contents > 

Client Control Interface Manual > Job > Entity Objects > Control Objects

Control Objects
Previous pageReturn to chapter overviewNext page

Enable Control

IO Control Object (ScWaitForInput and ScSetOutput) Properties

Jump Entity

MOTF Offset

Motion Axis Add Control

Motion Entity Parameter Get

Motion Entity Parameter Set

Motion Entity String

Timer Value

 

Enable Control
 

Set

Get

DLL Function

int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Checkbox)

int Checkbox = ScCciGetEntityLongData(string Entity_Name, int Data_ID)

ASCII Function

int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Checkbox)

int Checkbox = ScCciGetEntityLongData(string Entity_Name, int Data_ID)

Description

Set or get the enable checkbox state for control objects.

Entity_Name

Type: string

Unit: none

Specify the entity to be changed.

Data_ID

Type: int

ID:

Location: ScComSAMLightClientCtrlFlags

scComSAMLightClientCtrlLongDataIdEnableControl

126

Checkbox

Type: int

Unit: depends on constant

0: Deactivated.

1: Activated.

CCI_Return

Type: int

CCI return number, see error list.

Notes

-

C# Example: Disable the enable checkbox:

 

int CCI_Return = cci.ScSetEntityLongData("", (int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEnableControl, 0);

Table 171: Enable Control

IO Control Object (ScWaitForInput and ScSetOutput) Properties
 

Set

Get

DLL Function

int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Parameter)

int Parameter = ScGetEntityLongData(string Entity_Name, int Data_ID)

ASCII Function

int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Parameter)

int Parameter = ScCciGetEntityLongData(string Entity_Name, int Data_ID)

Description

Set or get properties of ScWaitForInput and ScSetOutput entities.

Entity_Name

Type: string

Unit: none

Specify the entity to be changed.

Data_ID

Type: int

ID:

Location: ScComSAMLightClientCtrlFlags

scComSAMLightClientCtrlLongDataIdEntitySetOutputPulse

64

Set the pulse length of a ScSetOutput entitiy. Unit here: [µs]. Unit in SAMLight: [ms]

Value greater than 0 enables the output pulse functionality and sets this pulse length.

Value -1 disables the pulse checkbox.

scComSAMLightClientCtrlLongDataIdEntityGetOutputPulse

69

Get the pulse length of a ScSetOutput entitiy. Unit here: [µs]. Unit in SAMLight: [ms]. Value is -1 means the pulse checkbox is disabled.

scComSAMLightClientCtrlLongDataIdEntityIoControlObjectMask

146

Mask is a decimal number that is best understood binary:

The bits represent a value:

0: ignored (SAMLight: "X")

1: used (SAMLight: "0" if Staten is 0, "1" if Staten is 1)

Some bits are undefined (gray). Which bit represents which in/output depends on the hardware and is shown below.

 

USC-1:

0000_0000_0000_0000_0000_0000_0010_0000

                               |     ╰Opto_In/Out_0

                               ╰Opto_In/Out_5

 

USC-2/-3:

0000_0000_0000_0000_0000_0000_0010_0000

                   |          ||     ╰Opto_In/Out_0

                   |          |╰Opto_In/Out_5

                   |          ╰Digi_In/Out_0

                   ╰Digi_In/Out_9

 

RTC3/4/5/6:

0000_0000_0000_0000_0000_0000_0010_0000

                   |                 ╰Digi_In/Out_0

                   ╰Digi_In/Out_15

Alternative mathematical representation of unsigned Mask:

 

 

scComSAMLightClientCtrlLongDataIdEntityIoControlObjectStates

147

States is a decimal number that is best understood binary:

The bits represent a value:

0: inactive (SAMLight: "X" if Maskn is 0,  "0" if Maskn is 1)

1: active (SAMLight: "X" if Maskn is 0,  "1" if Maskn is 1).

Some bits are undefined (gray). Which bit represents which in/output depends on the hardware and is shown below.

 

USC-1:

0000_0000_0000_0000_0000_0000_0010_0000

                               |     ╰Opto_In/Out_0

                               ╰Opto_In/Out_5

 

USC-2/-3:

0000_0000_0000_0000_0000_0000_0010_0000

                   |          ||     ╰Opto_In/Out_0

                   |          |╰Opto_In/Out_5

                   |          ╰Digi_In/Out_0

                   ╰Digi_In/Out_9

 

RTC3/4/5/6:

0000_0000_0000_0000_0000_0000_0010_0000

                   |                 ╰Digi_In/Out_0

                   ╰Digi_In/Out_15

 

Alternative mathematical representation of unsigned States:

 

 

Parameter

Type: int

Unit: depends on constant

The corresponding value.

CCI_Return

Type: int

CCI return number, see error list.

Notes

-

C# Example: Set ScWaitForInput "wait for input" values to "XXXX XXXX XXXX 10XX" → Wait for Opto_Out_2 to be inactive and Opto_Out_3 to be active, ignore all other inputs:

 

int CCI_Return_01 = cci.ScSetEntityLongData( "wait for input", ( int )ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityIoControlObjectMask, 12 );

int CCI_Return_02 = cci.ScSetEntityLongData( "wait for input", ( int )ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityIoControlObjectStates, 8 );

C# Example: Set ScSetOutput "set output" values to "XXXX XXXX XXXX XX1X" → Set Opto_Out_1 to active, ignore all other outputs:

 

int CCI_Return_01 = cci.ScSetEntityLongData( "set output", ( int )ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityIoControlObjectMask, 2 );

int CCI_Return_02 = cci.ScSetEntityLongData( "set output", ( int )ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityIoControlObjectStates, 2 );

C# Example: Get ScSetOutput "set output" values and interpret ScSetOutput Mask 96 and States 32:

int Mask = cci.ScGetEntityLongData( "set output", ( int )ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityIoControlObjectMask );

int States = cci.ScGetEntityLongData( "set output", ( int )ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityIoControlObjectStates );

 

Mask: (96)dec = (0000 0000 0110 0000)bin

States: (32)dec = (0000 0000 0010 0000)bin

Mask an States combined: "XXXX XXXX X01X XXXX" → Set Opto_Out_5 to active, Set Digi_Out_0 to inactive, ignore all other outputs.

C# Example: Set pulse value to 20 ms of ScSetOutput entity "set output":

 

int CCI_Return = cci.ScSetEntityLongData("set output", (int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntitySetOutputPulse, 20000);

C# Example: Get output pulse length of the entity "set output":
 
int Pulse_Length = cci.ScGetEntityLongData("set output", (int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityGetOutputPulse);

Table 172: IO Control Object Properties

Jump Entity
 

Set

Get

DLL Function

int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int State)

int State = ScGetEntityLongData(string Entity_Name, int Data_ID)

ASCII Function

int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int State)

int State = ScCciGetEntityLongData(string Entity_Name, int Data_ID)

Description

Set or get the state of the ScJump entity.

Entity_Name

Type: string

Unit: none

Specify the entity to be changed.

Data_ID

Type: int

ID:

Location: ScComSAMLightClientCtrlFlags

scComSAMLightClientCtrlLongDataIdEntityJump

132

State

Type: int

Unit: none

0: Disable.

1: Enable.

X coordinate: DoublePara1

Y Coordinate: DoublePara2

Z Coordinate: DoublePara3

Entity Name: StringPara1

CCI_Return

Type: int

CCI return number, see error list.

Notes

-

C# Example: Set jump Entity to Position (10/10/10) with Entity Name "jump1":

 

int CCI_Return_01 = cci.ScSetDoubleValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeDoublePara1, 10.0 );

int CCI_Return_02 = cci.ScSetDoubleValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeDoublePara2, 10.0 );

int CCI_Return_03 = cci.ScSetDoubleValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeDoublePara3, 10.0 );

int CCI_Return_04 = cci.ScSetStringValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeStringPara1, "jump1" );

int CCI_Return_05 = cci.ScSetEntityLongData("jump1", (int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityJump, 1);

C# Example: Check, if the "jump1" entity is enabled:
 
int Enabled = cci.ScGetEntityLongData("jump1", (int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityJump);

int X_Position = cci.ScSetDoubleValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeDoublePara1 );

int Y_Position = cci.ScSetDoubleValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeDoublePara2 );

int Z_Position = cci.ScSetDoubleValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeDoublePara3 );

Table 173: Jump Entity

MOTF Offset
 

Set

Get

DLL Function

int CCI_Return = ScSetEntityDoubleData(string Entity_Name, int Data_ID, double MOTF_Offset)

int CCI_Return = ScGetEntityDoubleData(string Entity_Name, int Data_ID, ref double MOTF_Offset)

ASCII Function

int CCI_Return = ScCciSetEntityDoubleData(string Entity_Name, int Data_ID, double MOTF_Offset)

double MOTF_Offset = ScCciGetEntityDoubleData(string Entity_Name, int Data_ID)

Description

Set or get the distance of a ScMotfOffset control object.

Entity_Name

Type: string

Unit: none

Specify the entity to be changed.

Data_ID

Type: int

ID:

Location: ScComSAMLightClientCtrlFlags

scComSAMLightClientCtrlDoubleDataIdMotfOffset

70

MOTF_Offset

Type: double

Unit: [mm]

The offset value.

CCI_Return

Type: int

CCI return number, see error list.

Notes

-

C# Example: Set the MOTF offset value to 10 mm for the entity "motfoff1":

 

int CCI_Return = cci.ScSetEntityDoubleData( "motfoff1", ( int )ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdMotfOffset, 10.0 );

C# Example: Get the MOTF offset value for the "motfoff1" entity:
 

double MOTF_Offset = 0.0;

int CCI_Return = cci.ScGetEntityDoubleData( "motfoff1", ( int )ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdMotfOffset, ref MOTF_Offset );

Table 174: CCI MOTF Offset

Motion Axis Add Control
 

Set

Get

DLL Function

int CCI_Return = ScSetDoubleValue(int Value_Type, double Position)

ASCII Function

int CCI_Return = ScCciSetDoubleValue(int Value_Type, double Position)

Description

Insert a new motion entity and set the corresponding position value.

Value_Type

Type: int

Location: ScComSAMLightClientCtrlValueTypes

scComSAMLightClientCtrlDoubleValueTypeMotionAxisAddControl

64

Position

Type: double

Unit: depends on constant

The desired position coordinate.

CCI_Return

Type: int

CCI return number, see error list.

Notes

-

C# Example: Insert new motion entity at 60.0:

 

int CCI_Return = cci.ScSetDoubleValue( ( int )ScComSAMLightClientCtrlValueTypes.scComSAMLightClientCtrlDoubleValueTypeMotionAxisAddControl, 60.0 );

Table 175: Motion Axis Add Control

Motion Entity Parameter Get
 

Set

Get

DLL Function

int CCI_Return = ScGetEntityDoubleData(string Entity_Name, int Data_ID, ref double Parameter)

ASCII Function

double Parameter = ScCciGetEntityDoubleData(string Entity_Name, int Data_ID)

Description

Get a position of a motion control object.

Entity_Name

Type: string

Unit: none

Enter the name of the entity to be changed.

Data_ID

Type: int

ID:

Location: ScComSAMLightClientCtrlFlags

scComSAMLightClientCtrlDoubleDataIdGetMotionCtrlPos

97

Parameter

Type: double

Unit: [mm]* or [deg]

The position of a motion control object.

CCI_Return

Type: int

CCI return number, see error list.

Notes

MotionAxis has to be set first.

C# Example: Get position of motion control object "Motion1":
 
double Motion_Position = 0.0;

int CCI_Return = cci.ScGetEntityDoubleData( "Motion1", ( int )ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlDoubleDataIdGetMotionCtrlPos, ref Motion_Position );

Table 176: Motion Entity Parameter Get

Motion Entity Parameter Set
 

Set

Get

DLL Function

int CCI_Return = ScSetEntityStringData(string Entity_Name, int Data_ID, string Parameter)

ASCII Function

int CCI_Return = ScCciSetEntityStringData(string Entity_Name, int Data_ID, string Parameter)

Description

Set parameter of a motion control object.

Entity_Name

Type: string

Unit: none

Specify the entity to be changed

Data_ID

Type: int

ID:

Location: ScComSAMLightClientCtrlFlags

scComSAMLightClientCtrlStringDataIdSetMotionCtrls

26

Parameter

Type: string

Unit: none

The format for Parameter is:

1.For one axis, parameters are separated by semicolon:
< axis Index: 0..6 or -1 for all axes > (can not be empty)
< position as float value > (can be an empty string (""))
< speed as float value > (can be an empty string)
< relative movement 0 or 1 > (can be an empty string)

2.For all axes:
Up to 7 one axis strings, separated by space (" ").

3.For more than one motion entity - with one single function call:
As standard for this case there are multiple all axes strings separated by a vertical tab ("\v"). To activate this mode call: ScSetMode (ScGetMode() Or 'NamesSeparatedBySemicolon') Multiple entity names must be separated by a semicolon.

CCI_Return

Type: int

CCI return number, see error list.

Notes

-

C# Example: Send the motion data to the motion entity "Motion1": First axis (0),2.2 mm target position, 33.3 mm/s speed, absolute movement (0); second axis (1), 4.4 mm target position, 55.5 mm/s speed, relative movement (1):

 

int CCI_Return = cci.ScSetEntityStringData( "Motion1", ( int )ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlStringDataIdSetMotionCtrls, "0;2.2;33.3;0 1;4.4;55.5;1" );

Table 177: Motion Entity Parameter Set

Motion Entity String

 

Set

Get

DLL Function

int CCI_Return = ScSetEntityStringData(string Entity_Name, int Data_ID, string Parameter)

ASCII Function

int CCI_Return = ScCciSetEntityStringData(string Entity_Name, int DataID, string Parameter)

Description

Set string of a string motion control object.

Entity_Name

Type: string

Unit: none

Specify the entity to be changed.

Data_ID

Type: int

ID:

Location: ScComSAMLightClientCtrlFlags

scComSAMLightClientCtrlStringDataIdSetMotionCtrlsString

33

Parameter

Type: string

Unit: none

The motion control string.

CCI_Return

Type: int

CCI return number, see error list.

Notes

-

C# Example: Set the motion string of entity "Motion1" to "MA 0":

 

int CCI_Return = cci.ScSetEntityStringData( "Motion1", ( int )ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlStringDataIdSetMotionCtrlsString, "MA 0" );

Table 178: Motion Entity String

Timer Value
 

Set

Get

DLL Function

int CCI_Return = ScSetEntityLongData(string Entity_Name, int Data_ID, int Timer_Value)

int Timer_Value = ScGetEntityLongData(string Entity_Name, int Data_ID)

ASCII Function

int CCI_Return = ScCciSetEntityLongData(string Entity_Name, int Data_ID, int Timer_Value)

int Timer_Value = ScCciGetEntityLongData(string Entity_Name, int Data_ID)

Description

Set or get the timer value.

Entity_Name

Type: string

Unit: none

Specify the entity to be changed

Data_ID

Type: int

ID:

Location: ScComSAMLightClientCtrlFlags

scComSAMLightClientCtrlLongDataIdEntitySetTimerValue

61

By using this constant the time value of a ScTimer object can be changed.

scComSAMLightClientCtrlLongDataIdEntityGetTimerValue

66

The current delay time of the ScTimer entity is read.

Timer_Value

Type: int

Unit: [ms]

The timer value.

CCI_Return

Type: int

CCI return number, see error list.

Notes

-

C# Example: Set the timer entity "timer1" to 10ms:
 
int CCI_Return =cci.ScSetEntityLongData("timer1", (int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntitySetTimerValue, 10);

C# Example: Get the current timer value of the timer entity "timer1"
 
int timer_value = cci.ScGetEntityLongData("timer1", (int)ScComSAMLightClientCtrlFlags.scComSAMLightClientCtrlLongDataIdEntityGetTimerValue);

Table 179: Timer Value