Api Class
Represents the EtherCAT settings.
Inheritance hierarchy
System.Object
IntervalZero.KINGSTAR.Local.Api
Namespace: IntervalZero.KINGSTAR.Local.Api
Assembly: IntervalZero.KINGSTAR.Local.Api (in IntervalZero.KINGSTAR.Local.dll) Version: 4.4.0.0
Syntax
public class Api
Public Class Api
The Api class exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
|
Api | Initializes a new instance of the Api class. |
Axis control methods
Reads and writes the values relevant to an axis.
| Name | Description | |
|---|---|---|
|
ForceAxisInputBit | Writes a bit into an input of a simulated axis. |
|
ForceAxisInputByte | Writes a byte into an input of a simulated axis. |
|
ForceAxisInputDWord | Writes a double word into an input of a simulated axis. |
|
ForceAxisInputs | Writes a double word into an input of an axis. |
|
ForceAxisInputWord | Writes a word into an input of a simulated axis. |
|
GetAxisBuffers | Provides pointers to the input and output buffers of an axis. |
|
GetAxisByIndex | Gets information from an axis. |
|
ReadAxisActualCurrent | Reads the variable (#x6078) of actual current. |
|
ReadAxisActualPosition | Reads the current position from an axis using the primary encoder. |
|
ReadAxisActualTorque | Reads the actual torque from an axis. |
|
ReadAxisActualVelocity | Reads the actual velocity from an axis. |
|
ReadAxisAlias | Reads an alias index from an axis. |
|
ReadAxisCustomInput1 | Reads the first custom input variable you added in IntervalZeroDevices database or UserDevices database, in which you can use KINGSTAR ESI Import Tool to add two custom input variables. |
|
ReadAxisCustomInput2 | Reads the second custom input variable you added in IntervalZeroDevices database or UserDevices database, in which you can use KINGSTAR ESI Import Tool to add two custom input variables. |
|
ReadAxisFollowingError | Reads a following error from an axis. |
|
ReadAxisInputBit | Reads a bit from an input of a real or simulated axis. |
|
ReadAxisInputByte | Reads a byte from an input of a real or simulated axis. |
|
ReadAxisInputDWord | Reads a double word from an input of a real or simulated axis. |
|
ReadAxisInputs | Reads a value from an input of an axis. |
|
ReadAxisInputWord | Reads a word from an input of a real or simulated axis. |
|
ReadAxisMopDisplay | Reads the value of the Modes of Operation Display variable in PDO. |
|
ReadAxisOutputBit | Reads a bit from an output of a real or simulated axis. |
|
ReadAxisOutputByte | Reads a byte from an output of a real or simulated axis with a byte offset. |
|
ReadAxisOutputDWord | Reads a double word from an output of a real or simulated axis. |
|
ReadAxisOutputs | Reads a value from an output of an axis. |
|
ReadAxisOutputWord | Reads a word from an output of a real or simulated axis. |
|
ReadAxisSecondEncoder | Reads the current position from an axis using the secondary encoder. |
|
ReadAxisStatusWord | Reads the value of the Statusword variable from an axis. |
|
ReadAxisTouchProbeStatus | Reads the variable (#x60B9) of the touch probe state. |
|
WriteAxisAlias | Writes an alias index into an axis. |
|
WriteAxisControlWord | Writes a value of the ControlWord variable into an axis. |
|
WriteAxisCustomOutput1 | Writes a value into the first custom output variable you added in IntervalZeroDevices database or UserDevices database, in which you can use KINGSTAR ESI Import Tool to add two custom output variables. |
|
WriteAxisCustomOutput2 | Writes a value into the second custom output variable you added in IntervalZeroDevices database or UserDevices database, in which you can use KINGSTAR ESI Import Tool to add two custom output variables. |
|
WriteAxisMaxCurrent | Writes the maximum current into an axis. |
|
WriteAxisMaxTorque | Writes the maximum torque into an axis. |
|
WriteAxisMop | Writes a value of the Modes of Operation variable into an axis. |
|
WriteAxisOutputBit | Writes a bit into an output of a real or simulated axis. |
|
WriteAxisOutputByte | Writes a byte into an output of a real or simulated axis. |
|
WriteAxisOutputDWord | Writes a double word into an output of a real or simulated axis. |
|
WriteAxisOutputs | Writes a value into an output of an axis. |
|
WriteAxisOutputWord | Writes a word into an output of a real or simulated axis. |
|
WriteAxisProfileAcceleration | Sets the Profile Acceleration of an axis. |
|
WriteAxisProfileDeceleration | Sets the Profile Deceleration of an axis. |
|
WriteAxisProfileVelocity | Sets the Profile Velocity of an axis. |
|
WriteAxisTargetPosition | Sets the target position of an axis. |
|
WriteAxisTargetTorque | Sets the target torque of an axis. |
|
WriteAxisTargetVelocity | Sets the target velocity of an axis. |
|
WriteAxisTorqueOffset | Sets the torque offset of an axis. |
|
WriteAxisTouchProbeControl | Writes the variable (#x60B8) of touch probe control. |
Axis variable methods
Enables the modes for an axis to use.
| Name | Description | |
|---|---|---|
|
EnableActualCurrent | Adds the actual current variable to PDO. |
|
EnableActualTorque | Adds the actual torque variable to PDO. |
|
EnableActualVelocity | Adds the actual velocity variable to PDO. |
|
EnableAxisInput | Adds the Digital Input variable to the PDO. |
|
EnableAxisOutput | Adds the Digital Output variable to the PDO. |
|
EnableFollowingError | Adds the Following Error variable to PDO. |
|
EnableMaxCurrent | Adds the Maximum Current variable to PDO. |
|
EnableMaxTorque | Adds the Max Torque variable to PDO. |
|
EnableProfilePosition | Adds the Profile Velocity, Profile Acceleration, and Profile Deceleration variables to PDO. |
|
EnableSecondEncoder | Adds the Internal Position variable to PDO. |
|
EnableSynchronizedControlMode | Adds the Modes of Operation and Modes of Operation Display variables to PDO. |
|
EnableTorqueOffset | Adds the torque offset variable to PDO. |
|
EnableTouchProbe | Adds the TouchProbeControl and TouchProbeStatus variables to PDO. |
|
SetAxisAccessMode | Sets the data transfer mode for EtherCAT drives. |
Command methods
The commands that wait, cancel, and get the states of a function.
| Name | Description | |
|---|---|---|
|
AbortCommand | Cancels a command. |
|
AbortCommand (byte[]) | Cancels a command. |
|
AbortCommand (byte) | Cancels a command. |
|
AbortCommand (double) | Cancels a command. |
|
AbortCommand (int) | Cancels a command. |
|
AbortCommand (long) | Cancels a command. |
|
AbortCommand (SdoEntryDescription) | Cancels a command. |
|
AbortCommand (SdoObjectDescription) | Cancels a command. |
|
AbortCommand (short) | Cancels a command. |
|
AbortCommand (uint) | Cancels a command. |
|
AbortCommand (ulong) | Cancels a command. |
|
AbortCommand (ushort[]) | Cancels a command. |
|
AbortCommand (ushort) | Cancels a command. |
|
GetCommandsStatus | Gets the states of commands. |
|
GetCommandStatus | Gets the state of a command. |
|
GetCommandStatus (byte[]) | Gets the state of a command. |
|
GetCommandStatus (byte) | Gets the state of a command. |
|
GetCommandStatus (double) | Gets the state of a command. |
|
GetCommandStatus (int) | Gets the state of a command. |
|
GetCommandStatus (long) | Gets the state of a command. |
|
GetCommandStatus (SdoEntryDescription) | Gets the state of a command. |
|
GetCommandStatus (SdoObjectDescription) | Gets the state of a command. |
|
GetCommandStatus (short) | Gets the state of a command. |
|
GetCommandStatus (uint) | Gets the state of a command. |
|
GetCommandStatus (ulong) | Gets the state of a command. |
|
GetCommandStatus (ushort[]) | Gets the state of a command. |
|
GetCommandStatus (ushort) | Gets the state of a command. |
|
WaitForCommand | Waits a command to be finished. |
|
WaitForCommand (byte[]) | Waits a command to be finished. |
|
WaitForCommand (byte) | Waits a command to be finished. |
|
WaitForCommand (double) | Waits a command to be finished. |
|
WaitForCommand (int) | Waits a command to be finished. |
|
WaitForCommand (long) | Waits a command to be finished. |
|
WaitForCommand (SdoEntryDescription) | Waits a command to be finished. |
|
WaitForCommand (SdoObjectDescription) | Waits a command to be finished. |
|
WaitForCommand (short) | Waits a command to be finished. |
|
WaitForCommand (uint) | Waits a command to be finished. |
|
WaitForCommand (ulong) | Waits a command to be finished. |
|
WaitForCommand (ushort[]) | Waits a command to be finished. |
|
WaitForCommand (ushort) | Waits a command to be finished. |
|
WaitForCommandAsync | Waits a command to be finished as an asynchronous operation. |
|
WaitForCommandAsync (byte[]) | Waits a command to be finished as an asynchronous operation. |
|
WaitForCommandAsync (byte) | Waits a command to be finished as an asynchronous operation. |
|
WaitForCommandAsync (double) | Waits a command to be finished as an asynchronous operation. |
|
WaitForCommandAsync (int) | Waits a command to be finished as an asynchronous operation. |
|
WaitForCommandAsync (long) | Waits a command to be finished as an asynchronous operation. |
|
WaitForCommandAsync (SdoEntryDescription) | Waits a command to be finished as an asynchronous operation. |
|
WaitForCommandAsync (SdoObjectDescription) | Waits a command to be finished as an asynchronous operation. |
|
WaitForCommandAsync (short) | Waits a command to be finished as an asynchronous operation. |
|
WaitForCommandAsync (uint) | Waits a command to be finished as an asynchronous operation. |
|
WaitForCommandAsync (ulong) | Waits a command to be finished as an asynchronous operation. |
|
WaitForCommandAsync (ushort[]) | Waits a command to be finished as an asynchronous operation. |
|
WaitForCommandAsync (ushort) | Waits a command to be finished as an asynchronous operation. |
Custom simulated motor methods
Methods to enable the custom simulated motor feature.
| Name | Description | |
|---|---|---|
|
ConfigureAxis | Configures the settings of a simulated axis and associates the axis with a custom simulated motor. This method can be used after the Subsystem has been created and before or after it has been started. |
|
GetAxisMotorType | Gets the simulated motor type of an axis. This method can only be used after the Subsystem has been started. |
|
LoadCustomMotorLibrary | Loads custom simulated motor RTDLL into KINGSTAR Runtime. Up to 256 custom simulated motor RTDLLs can be loaded. This method can only be used after the Subsystem has been created but before it has been started. |
Debug methods
Sends a log to your KINGSTAR application and identifies it.
| Name | Description | |
|---|---|---|
|
DebugMessage | Sends the KINGSTAR log messages to KINGSTAR Analysis Console. |
|
GetCategoryName | Gets a string assigned to a log ID. |
|
SetCategoryName | Sets a string to associate to a log ID. |
Heartbeat methods
Detects whether the motion application is running properly by sending periodic signals to KINGSTAR.
| Name | Description | |
|---|---|---|
|
PulseHeartbeat | Sends a signal to notify KINGSTAR that the motion application is running properly. |
|
SetHeartbeat | Configures the heartbeat settings, which periodically checks whether the motion application is running properly. |
I/O control methods
Reads and writes values into an I/O module, or get information from it.
| Name | Description | |
|---|---|---|
|
ForceInputBit | Writes a bit into an input of a simulated I/O module. |
|
ForceInputByte | Writes a byte into an input of a simulated I/O module. |
|
ForceInputDWord | Writes a double word into an input of a simulated I/O module. |
|
ForceInputWord | Writes a word into an input of a simulated I/O module. |
|
GetIOBuffers | Provides pointers to the input and output buffers of an I/O module. |
|
GetIOByIndex | Gets the information from a specified real or simulated I/O module. |
|
ReadInputBit | Reads a bit from an input of a real or simulated I/O module. |
|
ReadInputByte | Reads a byte from an input of a real or simulated I/O module. |
|
ReadInputDWord | Reads a double word from an input of a real or simulated I/O module. |
|
ReadInputWord | Reads a word from an input of a real or simulated I/O module. |
|
ReadIOAlias | Reads the alias index from a real or simulated I/O module. |
|
ReadOutputBit | Reads a bit from an output of a real or simulated I/O module. |
|
ReadOutputByte | Reads a byte from an output of a real or simulated I/O module with a byte offset. |
|
ReadOutputDWord | Reads a double word from an output of a real or simulated I/O module. |
|
ReadOutputWord | Reads a word from an output of a real or simulated I/O module. |
|
WriteIOAlias | Writes the alias index into a real or simulated I/O module. |
|
WriteOutputBit | Writes a bit into an output of a real or simulated I/O module. |
|
WriteOutputByte | Writes a byte into an output of a real or simulated I/O module. |
|
WriteOutputDWord | Writes a double word into an output of a real or simulated I/O module. |
|
WriteOutputWord | Writes a word into an output of a real or simulated I/O module. |
KINGSTAR memory methods
Reads and writes the KINGSTAR shared memory.
| Name | Description | |
|---|---|---|
|
GetMemoryPointer | Gets the stream of the data in the shared memory. |
|
ReadMemoryBit | Reads a bit from the shared memory. |
|
ReadMemoryByte | Reads a byte from the shared memory. |
|
ReadMemoryDWord | Reads a double word from the shared memory. |
|
ReadMemoryLWord | Reads a quad word from the shared memory. |
|
ReadMemoryWord | Reads a word from the shared memory. |
|
WriteMemoryBit | Writes a bit into the shared memory. |
|
WriteMemoryByte | Writes a byte into the shared memory. |
|
WriteMemoryDWord | Writes a double word into the shared memory. |
|
WriteMemoryLWord | Writes a quad word into the shared memory. |
|
WriteMemoryWord | Writes a word into the shared memory. |
Mailbox methods
Exchanges data between the EtherCAT master and slave.
| Name | Description | |
|---|---|---|
|
AoeReadCommand | Reads data through ADS over EtherCAT (AoE). |
|
AoeReadSdoObject | Reads data from a slave using the ADS over EtherCAT (AoE) SDO method. |
|
AoeReadWriteCommand | Reads and writes data through ADS over EtherCAT (AoE) at the same time. |
|
AoeWriteCommand | Writes data through ADS over EtherCAT (AoE). |
|
AoeWriteControlCommand | Sends a command to the device through ADS over EtherCAT (AoE). |
|
AoeWriteSdoObject | Writes data to a slave using the ADS over EtherCAT (AoE) SDO method. |
|
CoeReadSdoEntryDescription | Reads the description of an entry of an object dictionary from an SDO object through CANopen over EtherCAT (CoE). |
|
CoeReadSdoObject | Reads the value of an SDO object through CANopen over EtherCAT (CoE). |
|
CoeReadSdoObjectDescription | Reads the description of an SDO object through CANopen over EtherCAT (CoE). |
|
CoeReadSdoODList | Reads the list of object inddexes in a dictionary table using the CANopen over EtherCAT (CoE) SDO method. |
|
CoeWriteSdoObject | Writes the value of an SDO object through CANopen over EtherCAT (CoE). |
|
EoeSetSlaveEoeIp | Configures an EtherCAT slave's Ethernet over EtherCAT (EoE) network settings. |
|
FoeReadFileToBuffer | Reads the servo drive's file and saves it in the user application's memory space. |
|
FoeReadFileToFile | Reads the servo drive's file and saves it on the local machine. |
|
FoeWriteFileFromBuffer | Reads a file from the local buffer and writes it to the device. |
|
FoeWriteFileFromFile | Reads a file on the local machine and writes it to the device. |
|
ReadAxisSdoObject | Reads a value of an SDO object from an axis. |
|
ReadIOSdoObject | Reads a value of an SDO object from an I/O module. |
|
RegisterMailboxCallback | Registers a function that the KINGSTAR Subsystem will call when a mailbox message comes in. |
|
SoeReadSsc | Uploads data from an EtherCAT slave to the EtherCAT master through SoE (Servo drive profile over EtherCAT). |
|
SoeWriteSsc | Downloads data from the EtherCAT master to a EtherCAT slave through SoE (Servo drive profile over EtherCAT). |
|
VoeWrite | Writes data into a VoE-enabled device through VoE (Vendor-specific protocol over EtherCAT). |
|
WriteAxisSdoObject | Writes the value of an SDO object into an axis. |
|
WriteIOSdoObject | Writes the value of an SDO object into an I/O module. |
Modular slaves methods
Configures the devices that cannot be detected by auto-configuration.
| Name | Description | |
|---|---|---|
|
AddModuleConfiguration (CanOpenSetting) | Adds a CANopen device that auto-configuration cannot detect. |
|
AddModuleConfiguration (EcatMdpSetting) | Adds a Modular Device Profile (MDP) that auto-configuration cannot detect. |
|
AddModuleConfiguration (El6695Setting) | Adds an EL6695 device that auto-configuration cannot detect. |
|
AddModuleConfiguration (EsiSetting) | Manually select a compatible ESI definition for a device and override the EtherCAT auto-configuration. |
|
AddModuleConfiguration (IoLinkSetting) | Adds an IO-Link device that auto-configuration cannot detect. |
|
AddModuleConfiguration (SafetySetting) | Adds a safety device that auto-configuration cannot detect. |
|
GetConfiguredModuleCount | Gets the number of the configured devices. |
|
GetModuleConfiguration | Gets the information of the configured device. |
|
RemoveModuleConfiguration | Removes the configured device. |
Simulated hardware methods
Configures simulated hardware.
| Name | Description | |
|---|---|---|
|
ConfigureAxis | Configures the settings of a simulated axis. |
|
ConfigureIo | Configures the settings of a simulated I/O module. |
|
GetConfiguredAxesCount | Gets the number of simulated axes. |
|
GetConfiguredIoCount | Gets the number of simulated I/O modules. |
|
SetConfiguredAxesCount | Configures a number of simulated axes. |
|
SetConfiguredIoCount | Configures a number of simulated I/O modules. |
Slave control methods
Reads and writes data from an EtherCAT slave.
| Name | Description | |
|---|---|---|
|
GetSlaveById | Gets detailed information from a specified slave using an ID. |
|
OverrideSlavePdoConfiguration | Changes the input and output PDO length of the device to the new values. This can be used to programmatically set the configuration of a device. |
|
ReadAllSlaveEEprom | Reads all data from a slave's EEPROM. |
|
ReadSlaveAlias | Reads the alias address from an EtherCAT slave. |
|
ReadSlaveEEprom | Reads a double word from a slave's EEPROM. |
|
ReadSlaveRegister | Reads data from an EtherCAT slave's register. |
|
ReloadSlaveEEprom | Reloads a slave's EEPROM. |
|
RequestSlaveState | Requests an EtherCAT slave to go into the specified EtherCAT state. |
|
ResetSlaveEsc | Resets a slave's EtherCAT slave controller. |
|
RestartSlave | Restarts the specified slave. |
|
WriteAllSlaveEEprom | Writes all data into a slave's EEPROM. |
|
WriteSlaveAlias | Writes an alias address into an EtherCAT slave. |
|
WriteSlaveEEprom | Writes a double word into a slave's EEPROM. |
|
WriteSlaveRegister | Writes data into an EtherCAT slave's register. |
Subsystem configuration methods
Configures the KINGSTAR Subsystem settings.
| Name | Description | |
|---|---|---|
|
ConfigureDc | Configures distributed clock (DC) options. |
|
EnableAutoConfig | Allows auto-config to be enabled. It automatically configures the EtherCAT settings for your servo drives. |
|
EnableAutoRepair | Allows auto-repair to be enabled. |
|
EnableAutoRestart | Allows for auto-restart to be enabled. |
|
EnableHotConnect | Allows new hardware to be added while the EtherCAT network is running. |
|
EnableRedundancy | Enables cable redundancy. |
|
EnableServerLog | Enables the connection messages from the KINGSTAR runtime on RTX64 console. |
|
EnableShutdownHandler | Attaches a shutdown handler while an EtherCAT connection is being established. |
|
GetFeatureStatus | Gets the current state of a feature from the subsystem. |
|
SetCycleTime | Sets the EtherCAT cycle time. |
|
SetFeatureStatus | Sets the subsystem's feature. |
Subsystem control methods
Starts, stops, and check the state of the KINGSTAR Subsystem.
| Name | Description | |
|---|---|---|
|
Create | Prepares to link a program to the KINGSTAR Subsystem. |
|
CreateAsync | Prepares to link a program to the KINGSTAR Subsystem as an asynchronous operation. |
|
Destroy | Closes the link to the KINGSTAR Subsystem and terminates the Subsystem. |
|
DestroyAsync | Closes the link to the KINGSTAR Subsystem and terminates the Subsystem as an asynchronous operation. |
|
Dispose | Disconnects the application from KINGSTAR and releases any unmanaged resources. It is essential to invoke the Dispose method when the instance is no longer needed. |
|
EnableAliases | Enables the alias indexes for the axis and I/O index parameters in all methods. |
|
GetAliasesStatus | Checks whether the program has enabled aliasing through EnableAliases. |
|
GetDCSystemTime | Gets the time stamp of the selected Sync0's signal of the distributed clock (DC). |
|
GetStatus | Gets the state of an EtherCAT link. |
|
GetStatusEx | Gets the extended state of an EtherCAT link. |
|
Log | Records the specified data in the logging shared memory. |
|
RegisterCallback | Registers a method that the KINGSTAR Subsystem will call every cycle when new data comes in. |
|
RequestState | Requests the KINGSTAR Subsystem to go into the specified EtherCAT state. |
|
Restart | Restarts the EtherCAT master. |
|
Start | Starts the KINGSTAR Subsystem. |
|
StartFromConfiguration | Starts the KINGSTAR Subsystem using the configuration file created by KINGSTAR Configuration Tool. |
|
Stop | Stops the EtherCAT network and the KINGSTAR Subsystem. |
|
StopLog | Stops recording the specified data in the logging shared memory. |
|
SubsystemIsRunning | Allows the users to check if the KINGSTAR Subsystem process is running without starting it if it is not. This can be used before Create and after Destroy. |
|
Unlink | Disconnects the application from KINGSTAR without terminating the KINGSTAR Subsystem. |
Trigger methods
Sets or gets a trigger that is used to start a new move.
| Name | Description | |
|---|---|---|
|
GetTrigger | Gets the details of a trigger. |
|
SetTrigger | Configures a trigger. |
Variable table
Allows users to define their own variables and use them in their applications and KINGSTAR tools.
| Name | Description | |
|---|---|---|
|
AddVariable | Adds a user-defined variable. |
|
GetVariable | Gets the details of a user-defined variable. |
|
GetVariables | Gets the list of user-defined variables. |
|
ReadBoolVariable | Reads a bool value from a variable. |
|
ReadByteVariable | Reads an 8-bit unsigned integer value from a variable. |
|
ReadDIntVariable | Reads an integer value from a variable. |
|
ReadDoubleVariable | Reads a double value from a variable. |
|
ReadDWordVariable | Reads an unsigned integer value from a variable. |
|
ReadFloatVariable | Reads a float value from a variable. |
|
ReadIntVariable | Reads a short integer value from a variable. |
|
ReadLIntVariable | Reads a long integer value from a variable. |
|
ReadLWordVariable | Reads an unsigned long integer value from a variable. |
|
ReadRawVariable | Reads a byte array from a variable. |
|
ReadSIntVariable | Reads an 8-bit integer value from a variable. |
|
ReadWordVariable | Reads an unsigned short integer value from a variable. |
|
RemoveVariable | Removes a user-defined variable. |
|
WriteVariable (bool) | Writes a bool value into a variable. |
|
WriteVariable (byte) | Writes an 8-bit unsigned integer value into a variable. |
|
WriteVariable (byte[]) | Writes a byte array into a variable. |
|
WriteVariable (double) | Writes a double value into a variable. |
|
WriteVariable (float) | Writes a float value into a variable. |
|
WriteVariable (int) | Writes an integer value into a variable. |
|
WriteVariable (long) | Writes a long integer value into a variable. |
|
WriteVariable (sbyte) | Writes an 8-bit integer value into a variable. |
|
WriteVariable (short) | Writes a short integer value into a variable. |
|
WriteVariable (uint) | Writes an unsigned integer value into a variable. |
|
WriteVariable (ulong) | Writes an unsigned long integer value into a variable. |
|
WriteVariable (ushort) | Writes an unsigned short integer value into a variable. |
See also