Additional parameters

Some systems may support or require additional information in the function blocks. For example a PLC may have several CAN channels. In that case the function blocks require the channel number of the service. Another requirement will be to limit the time a function block takes until it reports to the caller if the function block is executed with or without success. Therefore a Timeout input (milliseconds) is required. Therefore these parameters are added to the function blocks.

In DS405 it is allowed and within CAA_CiA405.Library  it is mandatory to add the following parameters to the function blocks:

 

NETWORK: USINT; (*CAN channel number*)

Selects the CAN channel on which the requested service has to be executed (starting from number 1). A device with only one CAN channel available must accept either the number 1 only or must accept all numbers, i.e. must ignore the value at this input.

 

CHANNEL: USINT; (*SDO channel number*)

Selects the SDO channel on which the requested service has to be executed (starting from number 1). A device with only one SDO channel available must accept either the number 1 only or must accept all numbers, i.e. must ignore the value at this input.

The CAN channel number is not the same like the Net ID specified in the CANBus configurator. For calculating the CAN channel number use following formula: Net ID + 1

 

TIMEOUT: UDINT; (*milliseconds; maximum wait time for response*)

The timeout defines the maximum wait time for a response of the function block. The time measurement starts with the rising edge on input ENABLE of the called function block. When the defined maximum time is reached without being a response to the requested service available, the function block terminates the execution and signals error timeout. For an infinite wait time for response the value 0 is used at this input.

 

Within the CAA_CiA405.Library one additional output to the function block  CIA405.GET_CANOPEN_KERNEL_STATE is defined:

DEVICE: CIA405.DEVICE; (*source of STATE *)

DEVICE contains either the device number of the device to which the STATE is connected to (for example in case of reception of an unknown data format) or the number of the device where the kernel is located.

 

Within the CAA_CiA405.Library  one additional input to the function block CIA405.SDO_WRITE is defined: 

MODE: CIA405.SDO_MODE; (*type of protocol *)

MODE select the method for sending/receiving the data from the server regarding the SDO protocol specification in /CIA301/