APIs, concepts, guides, and more
NetworkNode

🔹 RPCs

rpc NetworkNode (NetworkNodeRequest) returns (NetworkNodeResponse) {};
rpc NetworkNodeBatch (NetworkNodeBatchRequest) returns (NetworkNodeBatchResponse) {};

🔹 Request

message NetworkNodeRequest {
// Common request header
RSI.RapidServer.RequestHeader header = 1;
// Network Node index
int32 index = 2;
optional NetworkNodeConfig config = 3;
optional NetworkNodeAction action = 4;
}

🔹 Response

message NetworkNodeResponse {
// Common response header. Always check the response header for errors.
RSI.RapidServer.ResponseHeader header = 1;
// Network Node index
int32 index = 2;
optional NetworkNodeConfig config = 3;
optional NetworkNodeAction action = 4;
optional NetworkNodeInfo info = 5;
optional NetworkNodeStatus status = 6;
}

🔹 Batch Request and Response

message NetworkNodeBatchRequest {
// Common request header
RSI.RapidServer.RequestHeader header = 1;
repeated NetworkNodeRequest requests = 2;
}
message NetworkNodeBatchResponse {
// Common response header. Always check the response header for errors.
RSI.RapidServer.ResponseHeader header = 1;
repeated NetworkNodeResponse responses = 2;
}

🔹 Config

message NetworkNodeConfig {
// A user label for a single I/O point on this node.
message IOUserLabel {
// The zero-based bit number (digital) or channel number (analog).
int32 index = 1;
// The label. At most Constants.user_label_character_count_maximum characters.
// An empty string clears the label.
string label = 2;
}
// Human-readable name for this node. On set: only written when this field is
// present; an empty string clears the label. On get: only populated when the
// node's initialization state is at least DISCOVERED.
optional string user_label = 1;
// Per-I/O-point user labels.
// On set: SPARSE - only the entries provided are written; unspecified channels
// are untouched. An entry with an empty label clears that channel's label.
// Requires initialization state CONFIGURED. Entries are written in order until
// the first invalid entry; that single error is reported in the response header
// and the remaining entries (and any Action in the request) are not processed.
// On get: FULL - one entry per channel, index 0..count-1, in order; channels
// without a label have an empty label string. Empty lists when the node's
// initialization state is not CONFIGURED.
repeated IOUserLabel digital_input_user_labels = 2;
repeated IOUserLabel digital_output_user_labels = 3;
repeated IOUserLabel analog_input_user_labels = 4;
repeated IOUserLabel analog_output_user_labels = 5;
}

🔹 Action

// The state of the digital output at the specified bit number.
message DigitalOutput {
// The bit number.
int32 bit_number = 1;
// The state of the digital output. When this message is used as a request
// to set a digital output, the digital output will be set to this value.
// When this message is returned as an action response, this field holds the
// new state.
bool state = 2;
}
// The value of the analog output at the specified channel.
message AnalogOutput {
// The channel number.
int32 channel = 1;
// The value of the analog output. When this message is used as a request
// to set an analog output, the analog output will be set to this value.
// When this message is returned as an action response, this field holds the
// new value.
int32 value = 2;
}
// The location, size, and value of a Service Data Object (SDO).
// This message is used to read or write SDOs on a network node.
// See NetworkNodeAction sdo_writes and sdo_reads.
message SDO {
// The SDO index.
int32 index = 1;
// The SDO sub-index.
int32 sub_index = 2;
// The number of bytes.
int32 byte_count = 3;
// The types of data values we can read or write.
enum ValueType {
option allow_alias = true;
UNKNOWN = 0;
INTEGER = 0;
STRING = 1;
BYTES = 2;
}
// When reading an SDO, specify the read type. Default is integer.
optional ValueType read_type = 4;
// Wait this long for a response, otherwise it will throw a timeout error.
optional uint32 timeout_milliseconds = 5;
// The SDO value.
// SDO write: This field is used to set the value to write.
// SDO read: This field is ignored when SDO read action request, but will contain the
// value read from the SDO in the SDO read action response.
oneof value {
// Integer value used for all non-string types.
int32 integer_value = 6;
// String value.
string string_value = 7;
// Raw bytes value
bytes bytes_value = 8;
}
}
// An ASCII command to execute on an AKD drive.
message AKDASCII {
// The command as a string.
string command = 1;
// The returned result of the command. This field is ignored when requesting
// an AKDASCII command.
optional string result = 2;
}
// A set of actions to perform on a network node. This message is used to
// request a set of actions. A new instance of this message will be returned
// containing the results of the requested acitons.
message NetworkNodeAction {
// Any number of digital outputs to set. Add instances of the DigitalOutput
// message to this field to set digital outputs. When this message is
// returned in the action response, this field contains the new states of
// the digital outputs.
repeated DigitalOutput digital_output_sets = 1;
// Any number of analog outputs to set. Add instances of the AnalogOutput
// message to this field to set analog outputs. When this message is
// returned in the action response, this field contains the new values of
// the analog outputs.
repeated AnalogOutput analog_output_sets = 2;
// The requested SDO value(s) to write to the network. Add instances of the
// SDO message to this field to write to SDOs. When this message is returned
// in the action response, this field will be empty.
repeated SDO sdo_writes = 3;
// The SDO(s) to be read from the network. Add instances of the SDO message
// to this field to read SDO values. When this message is returned in the
// action response, the SDO messages will contain the read values.
repeated SDO sdo_reads = 4;
// AKD ASCII command(s). Only used for Kollmorgen AKD drives. Add instances
// of the AKDASCII message to request an ASCII command. When this message
// is returned in the action response, the AKDASCII messages will contain
// both the command executed and the returned result as a string.
repeated AKDASCII akd_asciis = 5;
}

🔹 Info

message NetworkNodeInfo {
// True if hardware exists.
bool exists = 1;
// The node index.
int32 index = 2;
// The number of Axis objects on this node.
int32 axis_count = 3;
// True if this node has I/O.
bool has_io = 4;
// The number of digital/analog inputs and outputs on this node.
IOCounts io_counts = 5;
// The bit masks and 64-bit host addresses for this node's I/O.
IOAddresses io_addresses = 6;
// The node type.
RSINodeType type = 7;
// 32-bit vendor identifier.
uint32 vendor_id = 8;
// 32-bit product code.
uint32 product_code = 9;
// 32-bit hardware revision.
uint32 hardware_revision = 10;
// Station alias.
uint32 station_alias = 11;
// Serial number.
string serial_number = 12;
// The node's name.
string name = 13;
// Product name.
string product_name = 14;
// Vendor name.
string vendor_name = 15;
Constants constants = 16;
// The global network PDO indexes for this node's I/O channels.
IONetworkIndexes io_network_indexes = 17;
// The 64-bit host addresses (and data types) for this node's recordable status
// values, one entry per RSINetworkNodeAddressType. Empty when the node does not exist
// (see exists). Use with the Recorder service.
repeated AddressInfo addresses = 18;
// True if the node identity supports the Kollmorgen 0x2028 ASCII channel.
bool is_akd_ascii_command_supported = 19;
// Internal messages.
// The number of digital/analog inputs and outputs.
message IOCounts {
// Number of digital inputs.
int32 digital_inputs = 1;
// Number of digital outputs.
int32 digital_outputs = 2;
// Number of analog inputs.
int32 analog_inputs = 3;
// Number of analog outputs.
int32 analog_outputs = 4;
}
message IOAddresses {
// Masks and 64-bit host addresses for each digital input.
repeated AddressInfo digital_inputs = 1;
// Masks and 64-bit host addresses for each digital output.
repeated AddressInfo digital_outputs = 2;
// Masks and 64-bit host addresses for each analog input.
repeated AddressInfo analog_inputs = 3;
// Masks and 64-bit host addresses for each analog output.
repeated AddressInfo analog_outputs = 4;
}
message IONetworkIndexes {
// Global network input index for each digital input.
repeated int32 digital_inputs = 1;
// Global network output index for each digital output.
repeated int32 digital_outputs = 2;
// Global network input index for each analog input.
repeated int32 analog_inputs = 3;
// Global network output index for each analog output.
repeated int32 analog_outputs = 4;
}
message Constants {
// Default time to wait when reading or writing an SDO with ServiceChannelRead() or ServiceChannelWrite()
uint32 sdo_timeout_milliseconds_default = 1;
// Maximum characters in a node or I/O point user label (64).
uint32 user_label_character_count_maximum = 2;
// Size in bytes of the controller-wide shared buffer that stores I/O point user labels (65536).
uint32 io_user_label_buffer_bytes = 3;
}
}

🔹 Status

message NetworkNodeStatus {
// All the digital input states.
repeated bool digital_input_states = 2;
// All the digital output states.
repeated bool digital_output_states = 3;
// All the analog input values.
repeated int32 analog_input_values = 4;
// All the analog output values.
repeated int32 analog_output_values = 5;
// EtherCAT AL Status register (0x0130). Bits 0-3: state (1=Init, 2=PreOp, 4=SafeOp, 8=Op).
uint32 al_status = 6;
// EtherCAT AL Status Code register. Non-zero indicates an error condition.
uint32 al_status_code = 7;
// CANopen over EtherCAT (CoE) emergency message (8 bytes per CiA 301).
uint64 coe_emergency_message = 8;
// Network counter when CoeEmergencyMessage was received.
int32 coe_emergency_message_network_counter = 9;
// Cumulative EoE (Ethernet over EtherCAT) frames sent host->this node since network start.
uint64 eoe_host_to_node_frame_count = 10;
// Cumulative EoE frames received this node->host since network start.
uint64 eoe_node_to_host_frame_count = 11;
// The sync group this node is assigned to.
uint32 sync_group_id = 12;
// True if the node is currently present on the network.
bool present = 13;
// How far this node has progressed through network startup. General node
// lifecycle state: use it to judge the validity of any state-dependent node
// data (identity fields like serial number and vendor ID, I/O counts, etc.).
// For labels specifically: the node's user_label requires at least
// DISCOVERED; per-I/O-point labels require CONFIGURED.
RSINetworkNodeInitializationState initialization_state = 14;
// Advances whenever an I/O point user label is written on any node. 0 until the
// first I/O label write. The node's own user_label does NOT advance it.
uint64 io_user_label_generation = 15;
// Cumulative service channel reads the network firmware serviced for this node since
// network start: CoE SDO (service data object) uploads and also EtherCAT register
// reads (index below 0x1000), which skip the mailbox but use the same service
// channel thread.
uint64 sdo_read_count = 16;
// Cumulative service channel reads for this node that finished unsuccessfully (could not
// be issued, SDO abort or other error status, or the firmware's completion wait ran out
// with no response) since network start. That wait outlasts the host call's timeout, so
// the failure can be counted a second or more after the call already timed out.
uint64 sdo_read_fail_count = 17;
// Cumulative service channel writes the network firmware serviced for this node since
// network start: CoE SDO (service data object) downloads and also EtherCAT register
// writes (index below 0x1000), which skip the mailbox but use the same service
// channel thread.
uint64 sdo_write_count = 18;
// Cumulative service channel writes for this node that finished unsuccessfully (could not
// be issued, SDO abort or other error status, or the firmware's completion wait ran out
// with no response) since network start. That wait outlasts the host call's timeout, so
// the failure can be counted a second or more after the call already timed out. Register
// writes (index below 0x1000) are fire and forget and never count as failures.
uint64 sdo_write_fail_count = 19;
// Cumulative Kollmorgen AKD ASCII commands the network firmware serviced for this node since network start.
// Only the nodes where IsAKDASCIICommandSupported() is true accept AKDASCIICommand, so this and
// akd_ascii_fail_count stay 0 elsewhere. A command whose host call timed out before the firmware
// reached it is withdrawn and never counted, so a starved node can show fewer commands than the
// application sent.
uint64 akd_ascii_count = 20;
// Cumulative AKD ASCII commands for this node that failed to send or got no usable response since network start.
uint64 akd_ascii_fail_count = 21;
}