Adding Devices to a Communication Manager

Overview

You can add field devices to the communication manager by selecting the field device manager node (for example, CANopen or Modbus manager) in the Devices Tree and clicking the green plus sign. Alternatively, you can right-click the field device manager node in the Devices Tree and execute the Add Device command.

As a prerequisite, the device must be available in the Device Repository dialog box.

Adding Devices

Step

Action

1

Select the field device manager node (CANopen or Modbus manager) in the Devices Tree and click the green plus sign, or right-click the field device manager node and execute the Add Device... command from the contextual menu.

Result: The Add Device dialog box opens.

2

In the Add Device dialog box, select Schneider Electric from the list box Vendor.

Note: You can filter the devices by brand by clicking the list box Vendor.

3

Select the device of your choice from the list below.

4

Rename your device by typing a name in the Name textbox.

NOTE: Do not use spaces within the name. Do not use an underscore character (_) at the end of the name.

If you do not rename the device, a name is given by default.

Naming the device meaningfully may ease the organization of your project.

5

Click the Add Device button.

Result: The field device is added to the field device manager.

NOTE: The Add Device dialog box remains open.

You can do the following:

  • You can add another device by going back to step 2.

  • You can click the Close button.

Access to Diagnostic Information

To get diagnostic information of devices on CANopen, use the CAA_CiA405.library.

Access to Configuration Diagnostic (for Advanced Users)

You can use the options Abort if error and Jump to line if error in the Service Data Object tab of the CANopen configurator to manage potential configuration inconsistencies.

To optimize the CAN master performance, CAN diagnostics are external from the CAN master in the controller. The CAN diagnostic structure is defined in the CanConfig Extern library available in the Library Manager.

The structure g_aNetDiagnosis contains the most recent diagnostic information from the slaves. The structure is updated every time a slave is configured.

This structure can be used within the program to do the following:

  • Monitoring the response of the slaves configured via SDO messages.

  • Monitoring the master for abort messages from the slaves before allowing a machine / application start-up.

This structure must be in place and active within the user application during testing, debugging and commissioning of the application. When the machine and its controlling application have been commissioned and validated, then it would be possible to disable this code from execution to reduce traffic on the CANopen network.

However, if during the lifecycle of an application and the machine or process that it controls, slaves are added or replaced in the operational system, then the diagnostic structure should continue to remain active in the application.

 WARNING
UNINTENDED EQUIPMENT OPERATION
  • Use the g_aNetDiagnosis data structure within the application to monitor CAN slave responses to configuration commands.
  • Verify that the application does not start up or put the machine or process in an operational state in the event of receiving SDO abort messages from any of the CAN slaves.
Failure to follow these instructions can result in death, serious injury, or equipment damage.

After adding the CanConfig Extern library to your application, use the Net Diagnostic definition within your application to test for SDO abort messages from the CAN slaves.

The following code example illustrates the use of the CAN diagnostic data structure:

IF g_aNetDiagnosis[CAN_Net_Number].ctSDOErrorCounter = 0 THEN
    (* No error is detected in the configuration*)
ELSE
    (* An error has been detected during configuration. Get the latest error information.*)
    // node ID of the slave which sent the abort code
    ReadLastErrorNodeID := g_aNetDiagnosis[CAN_Net_Number].usiNodeID;
    // index used in the aborted SDO
    ReadLastErrorIndex := g_aNetDiagnosis[CAN_Net_Number].wIndex;
    // subIndex used in the aborted SDO
    ReadLastErrorSubIndex := g_aNetDiagnosis[CAN_Net_Number].bySubIndex;
    //SDO abort code
    ReadLastErrorSdoAbortCode := g_aNetDiagnosis [CAN_Net_Number].udiAbortCode;
    (* Do not allow the start-up or other operation of the machine or process *)
END_IF
NOTE: In this example, the CAN_Net_Number would be 0 for the CAN0 port and, if the controller is so equipped, 1 for the CAN1port.