Schneider Electric LUFP9 user manual Wrrunning

Page 92

9. Appendix C: Practical Example (RSLogix 500)

Management of the response timeout (T4:1). Until the response arrives or if its content is incorrect (bit B3:0/4 = 0), a 3-second timer is set. When this timeout (T4:1/DN = 1) is triggered, the timer is reinitialized, the parameter’s address (O:1.14, after LSB / MSB have been swapped using scratch variable N9:0) and an erroneous value (N9:1 = –1) are placed in the array of results, into two successive locations, reserved for the motor starter currently being polled. Finally, the write process is halted (bit B3:0/3 is reset).

The various data used by this sub-program are shown in the following table:

Address

Symbol

Description

B3:0/2

WR_COMMAND

User command: Writing a parameter on a TeSys U motor starter.

This bit is activated by the user and reset by the program.

 

 

B3.0/3

WR_RUNNING

Writing a parameter on a TeSys U motor starter: In progress

B3.0/4

WR_OK

Writing a parameter on a TeSys U motor starter: Writing OK (if the

response has arrived and is correct)

 

 

B3.0/6

————

The “trigger byte” of the query has been updated: Yes (1) / No (0)

I:1.13

CR_WRPAR_SLAVE_FCT

Result of writing the value of a parameter: Slave (16#01 to 16#08)

as LSB + function (always 16#06) as MSB. The values of these

 

 

fields are compared to those of the query

I:1.14

CR_WRPAR_ADRPAR

Result of writing the value of a parameter: Address of the

parameter. The value of this field is compared to that of the query

 

 

(swapping of the MSB and the LSB with each of these two fields)

I:1.15

CR_WRPAR_VALUE

Result of writing the value of a parameter: Value of the written

parameter. The value of this field is compared to that of the query

 

 

(swapping of the MSB and the LSB with each of these two fields)

N7:12

WR_SLAVE

User command: Modbus address of the motor starter to which the

write request should be sent.

 

 

 

 

User command: Address of the parameter

N7:13

WR_ADDRESS

N.B. Do not attempt to change the value of register 704 (command

register), because it is already controlled by the DeviceNet master

 

 

 

 

(see sub-program “LAD 3 - CMD_MON”)!

N7:14

WR_VALUE

User command: New value of the parameter

 

 

Index in the array of results for writing TeSys U parameters (motor

N7:15

WR_INDEX

starters nos. 1 to 8).

 

 

Value = 16 + 2 × (motor starter no. – 1) = 16 to 30

 

 

Array of results for writing TeSys U parameters (motor starters nos.

 

 

1 to 8). Elements N7:16 to N7:31 organized by “parameter address”

N7:[N7:15]

— [ WR_INDEX ]

/ “parameter value” pairs, each pair occupying two successive

addresses.

 

 

 

 

“Parameter value” = –1 if there is an error (response timeout

 

 

triggered).

N7:37

————

Local counter that corresponds to the “trigger byte” of the read

request.

 

 

N9:0

VAR_TEMP_1

Temporary variables used to carry out the intermediate evaluations

N9:1

VAR_TEMP_2

(primarily LSB / MSB swappings).

O:1.13

WRPAR_SLAVE_FCT

Request for writing the value of a parameter: Slave (copied from

N7:12) as LSB + function (always 16#06) as MSB.

 

 

O:1.14

WRPAR_ADRPAR

Request for writing the value of a parameter: Address of the

parameter (copied from N7:13, but with MSB and LSB swapped).

 

 

O:1.15

WRPAR_VALUE

Request for writing the value of a parameter: Value of the parameter

(copied from N7:14, but with MSB and LSB swapped).

 

 

92

Image 92
Contents LUFP9 Page LUFP9 Page Table of contents Introduction Introduction to the user guideAltistart Introduction to the LUFP9 GatewayTerminology Notational Conventions Additional DocumentationModbus Modbus VW33-A48Downstream network no.3 Modbus Downstream network no.1Principle Used to Configure and Operate the LUFP9 Gateway ABC Configurator Modbus networkLUFP9 gateway RSNetWorxRSLogix DeviceNet NetworkOn Receipt Configuration Modbus RTUHardware Implementation of the LUFP9 Gateway Mounting the gateway Dismounting the gateway Powering the gatewayMounting the Gateway on a DIN Rail Connecting the Gateway to the Modbus Network Examples of Modbus connection topologiesLUFP9 gateway TSXCSA00 Pin outsHubs, drops, taps, and line terminations Wiring recommendations for the Modbus network120 Ω Connecting the LUFP9 gateway to the DeviceNet network Wire colourCables PinConfiguring DeviceNet Communication Features Selector Switches DeviceNet speed 3 4 5 6 7Encoding the Gateway Address Selector DeviceNet Switches Address 3 4 5 6 7Speed Address Mac ID Signalling Software Implementation of the Gateway IntroductionSystem Architecture DeviceNet Master PLC SLC500 DeviceNet upstream networkManaging degraded modes Configuring the Motor StartersModbus cycle time Selecting and adding the master PLC’s DeviceNet scanner Configuring the Gateway in RsNetWorxInstalling the Gateway Description File Selecting and Adding the Gateway to the DeviceNet Network Editing gateway parametersSoftware Implementation of the Gateway Configuring the DeviceNet Scanner Configuring Inputs from the Gateway Service PLC input DescriptionI1.1 I1.2Configuring Outputs Intended for the Gateway Service PLC output DescriptionO1.1 O1.2Input Value Meaning MSB + LSB Description of Services Assigned to Gateway Inputs/OutputsOutput Value Meaning MSB + LSB Transferring the DeviceNet Scanner Configuration Developing a DeviceNet ApplicationGateway Initialization and Diagnostics Full ManagementSummary Control/Status Byte field Sub-chapterBits Description Fbhssend New DeviceNet master command wordFbdu Modbus exchange startup Bits Description Abchssend New gateway diagnostic 11EC Error code associated with the Modbus networkED Error data item associated with the Modbus network Gateway Status WordDescription of the error Diagnostic only DeviceNet Master Command Word Simplified Operation Configuring the Gateway Connecting the Gateway to the Configuration PCLUFP9 Configuration Female RJ45 RS-232 link protocolMale RJ45 PC COM Male 9 point SUB-DInstalling AbcConf Importing the Gateway ConfigurationTransferring a Configuration to the Gateway Monitoring the Content of the Gateway’s MemoryConfiguring the Gateway Procedure for deleting a Modbus slave Deleting a Modbus SlaveCopying a previously configured Modbus slave Adding a Modbus SlaveAdding a new type of Modbus slave Keyboard shortcut CtrlImporting/exporting a Modbus slave configuration Changing the Periodic Data Exchanged With a Modbus Slave Replacing a Periodic Input Data ElementReplacing an Output Periodic Data Element Increasing the Amount of Periodic Input Data Configuring the Gateway Configuring the Gateway I1.17 I1.18I1.19 I1.20Configuring the Gateway Configuring the Gateway Configuring the Gateway O1.17 O1.18Deleting Aperiodic Parameter Data Configuring the Gateway Changing a Modbus slave Configuration Changing the Name of a Modbus SlaveChanging the Address of a Modbus Slave Adding and Setting Up a Modbus Command Name of the Modbus command Modbus queryWith TeSys U Motor Starters Modbus responseWith a Generic Modbus Slave Configuring the Gateway DeviceNet Configuring the Query Configuration Description ElementConfiguring the Gateway Default communication mode. The query is transmitted Configuring the Response Configuring the Content of the Query Frame Field Size Description FrameFrame FieldSize Mode. The default value, CRC, should not be changed Configuring the Content of the Response FrameAdding a Special Modbus Command Modbus Commands Based on Standard CommandsModbus Commands which Can Be Completely Changed by the User Configuring the General Characteristics of the Gateway Fieldbus elementABC Element Sub-Network Element Configuring the Gateway Adding a Broadcaster Node Environment Appendix a Technical CharacteristicsCommunication Characteristics Inputs Input data areaOutputs General dataOutput data area General data areaAppendix B Default Configuration Configuring Modbus exchanges16#10 16#06Content of the Gateway’s Dpram Memory Input Data Memory Area16#0200 Appendix C Practical Example RSLogix Main Program LAD 2 MAINLUFP9Address Symbol Description ScanvalidationCmdreset Module Address Symbol DisplayAppendix C Practical Example RSLogix Numparam Appendix C Practical Example RSLogix Wrrunning Address Symbol Display Reserves relating to the RSLogix 500 exampleAppendix D DeviceNet Objects Introduction to the Gateway’s DeviceNet ObjectsList of the Gateway’s DeviceNet Objects Class Required Instances InterfacesGraphical Representation of the Gateway’s DeviceNet Objects Identity Object class 16#01Services of instance 16#01 of class 16#01 Attributes of instance 16#01 of class 16#01Message Router Object class 16#02 DeviceNet Object class 16#03Assembly Objects Class 16#04 Services of instance 16#01 of class 16#03Services in class 16#04 Revision index of the Assembly Object classServices of instances 16#64 and 16#96 of class 16#04 Connection Object Class 16#05Attributes of instance 16#64 of class 16#04 Modbus Inputs Attributes of instance 16#96 of class 16#04 Modbus OutputsServices in class 16#05 Attributes of class 16#05Initial comm. characteristics Watchdog timeout action16#83 Produced connection IDAccess Name Type Value 16#01 Get State16# 20 04 24 64 30 Type ValueGet / Set Produced connection path Type Value 16#07 Get / Set Produced connection size Type Value 16#04 Get / Set Produced connection ID #0 xxServices in class 16#2B Acknowledge Handler Object class 16#2BAttributes of instances 16#01 to 16#04 of class 16#05 Attributes of class 16#2BData with ack path list Services of instance 16#01 of class 16#2BType Value 16#06 Get Data with ack path list size Services in class 16#A0 Services of instance 16#01 of class 16#A010.10. I/O Data Input Mapping Object Class 16#A0 Attributes of class 16#A0Services in class 16#A1 Services of instance 16#01 of class 16#A110.11. I/O Data Output Mapping Object Class 16#A1 Attributes of class 16#A1Diagnostic Object Class 16#AA Services in class 16#AAAttributes of class 16#AA Attributes of instance 16#01 of class 16#AAAccess Name Need Type Value 16#09 Get LED status Module typeDeviceNet module status Changed data fieldServices of instance 16#01 of class 16#AA Appendix E Modbus Commands Frame Field Value or properties Read Holding Registers Command 16#03Preset Single Register command 16#06 Preset Multiple Registers Command 16#10 Modbus Protocol Exception ResponsesCode Name Description of the exception Exception Page User’s manual V1.0 2003-03