XG5000 Project Creation and Configuration

The example program XEM_SS2_ModRTU_Example.zip found in Example Applications contains the following steps already completed, and also includes the required user data type.

Step Action
1

Open XG5000 and select Project è New Project.

2

Enter a name in the Project Name field, then select the CPU series of your XEM CPU from the CPU Series drop-down. Press OK to create the new project.

3

Double-click on B0S0 Internal Cnet to configure the XEM CPU’s built-in RS-485 port.

4

Change the Baud Rate of CH 2 to 38400. Change the Operation Mode of CH 2 to Use P2P.

Select the Advanced tab and change Stop Bit to 2. Press OK when done.

5

Right-click on B0S0 Internal Cnet and select Add Item è P2P Communication.

6

Select 01 and press OK.

7

Under P2P 01(Internal), double-click P2P Channel.

8

Select Modbus RTU client for Channel 2. Press OK when done.

9

Press Yes to continue since no blocks have been created yet.

10

Double-click on Global/Direct Variables. This will allow you to create the variables controlling the SS2 drive.

11

Create the User Data type (for easier grouping of the SS2 data) and then Global Variables like the ones shown.

12

Under P2P 01(Internal), double-click P2P Block.

13

Create the Modbus RTU Client blocks shown below.

14

Save the Project. XG5000 Example Code shows some sample code that uses these global variables.

 

 

 

 

 

 

LP213-4