Varec 8315 Series manual Modbus Communications, Modbus Slave

Page 39

8300

8315 L&J Tankway Software Description

 

 

4.5Modbus Communications

The TankGate is capable of communicating with Modbus compatible devices. It is possible to communicate with both Modbus Masters and Slave devices. The TankGate is flexible, allowing communications with devices that strictly comply with the Modicon Modbus protocol, as well as devices with more advanced Modbus implementations such as Honeywell’s APM-SIO.

The Modbus Slave protocol handler responds to read and write requests from a Modbus master system. A detailed description of the Modbus Slave protocol handlers follows.

4.5.1Modbus Slave

The Modbus Slave protocol handler is enabled by setting the Protocol parameter of a COM point to Modbus Slave. COM 0 of the TankGate is auto sensing. If a Modbus Master requests data from the TankGate, the TankGate will automatically detect that Modbus is being used and invoke the Modbus Slave protocol handler. The Modbus Slave protocol handler responds to requests from Modbus masters. A MODGW point is automatically created to provide user access to the operation of the protocol handler. The MODGW point also provides dynamic information about the communications requests from the Modbus master.

The Modbus Slave protocol handler is flexible, allowing the user to set options for handling several aspects of Modbus communications. The Modbus Slave uses the GWBLK Gateway Block as a lookup table for data addresses.

The Gateway Block allows the user to specify data address and point reference combinations. This allows the TankGate to be used with an existing system that is already configured. The user defines a GWBLK point and specifies which parameter in the TankGate will be used for a particular address. When a request from a master is received, the Modbus Slave protocol handler will first search for any GWBLK points and determine if the data address of the request is specified in one of the GWBLK points. If the data address is contained in a GWBLK point, then the corresponding point reference is used to provide the data for the reply to the master.

COM 0 will automatically sense whether the host system is ViewRTU or a Modbus Master. The communications parameters for COM 0 are 9600 baud, 8 data bits and No Parity. When switching between ViewRTU and Modbus communications, it is necessary to wait 60 seconds for the current protocol to time-out. The TankGate will go back to the auto sensing mode and wait for a request. When a request is received, the TankGate will determine if the request is from ViewRTU or a Modbus Master. If the TankGate has problems switching, press the Reset button and this will force the TankGate back into the auto sensing mode.

COM 1 (if available) is always a Modbus Slave. The communications parameters for COM 1 are 9600 baud, 8 data bits and No Parity.

The TankGate uses the ID switch in determining to which address on the communications bus to respond.

29

Image 39
Contents Installation Operations Manual Page Copyright Disclaimer of Warranties Safety Precaution Definitions Safety Precautions Overview InstallationUsing ViewRTU Troubleshooting and maintenanceContents System Information SYS Using ViewRTU Troubleshooting Features VersionsApplications Operating temperature Specifications System DesignPower Supply Power consumptionStorage temperature HumidityMechanical Construction Overview TankGate Interface Hardware Motherboard Description Hardware Block DiagramTankGate motherboard Surge Protection Surge Gnd terminal block J4 Unit AC Input Power terminal block J2Field Power Vfield terminal block J3 Auxiliary DC Output Power terminal block J8Field Voltage Selection Jumper W3 AC Power Fuses F1,F2Switches and Indicators Reset push-button SW3Hard Reset 3.1 COM0 J7 Communications3.3 COM1 RS232/RS-485 Selection Switch SW2 3.4 COM1 Hardware Handshaking Switch SW13.2 COM1 RS-232/RS-485 J5 SW2 Set Tion Physical Handshak Ting Layer Ing Communica HardwareWith RTS / CTS RS-232J6 TankGate Communications Cable8315 L&J Tankway Interface Module Model 8315 TankGate DescriptionLED Indicators D1-D6 ID DIP Switch SW1Surge/Shield Ground Connector J4 External Power Connector +48V J2Connect the field wiring Field Wiring terminal block J38315 L&J Tankway Interface Module TankGate Interface Software Features Real-Time / Multitasking Executive Automatic Fault RecoveryReal-Time Clock System Tasks ProtocolsData Scanning Task Database ManagerTankGate 8315 Software Blocks TankGate Software BlocksParameter Classes Database OrganizationPoint Format Parameter DescriptionParameter Data Formats Common ParametersData Format Description Value Parameter PntCheckSum Parameter PntStatus Parameter Elapse ParameterChange of State-Related Parameters Gathering Point DataStandard Request-Response Format Change of State FormatDeadband Modbus Slave Modbus CommunicationsFixed Modbus Map Function Code Description CommentsAddress Type Number Parameter Data Type Gwblk method 8315 L&J Tankway Software Description TankGate Interface Data Address Parameter Comments Dynamic Parameters Function Configuration Parameters FunctionClock CLK ParametersCommunications COM Configuration Function ParametersApplication Floating Point Register Fpreg Dynamic Function ParametersReal 4 bytes value API Emulator EMUByte value indicating status of point Values are Hex representation of the request sent by the host Configuration Parame Function TersCurrent Command EMU Gateway EmugwDisplays the tank number of the currently selected tank Gauging Systems Inc. Model 2000 Interface GS2000 Last message. The maximum is 255 seconds. The default is Raw2 Gateway Block Gwblk Addr1 is the Data Address and PntRef1 is the corresponding Byte value indicating status of point Values are No errorCRC-16 Checksum of points static Configuration Parameters Size ParameterInteger 2 bytes value Integer Register IregCurrent request message, displayed in hex format Modbus Gateway ModgwCurrent command. Values include Value = Ax + By + Cz + K Scaler Point ScalerDynamic Parame Function Ters Output value for the Scaler pointValue parameter converted to Integer format System Information SYS 17 L&J MCG1000 Tank Gauge LJ1000 PntStatus will be set to indicate the failure Application 18 L&J MCG1500 Tank Gauge LJ1500 Task on the Motherboard determines that the Model 8315 has 8315 L&J Tankway Software Description TankGate Interface 19 L&J MCG2000 Tank Gauge LJ2000 Enables the watchdog task on the Motherboard. The watchdog 8300 20 L&J Scanner Ljscan Command currently being sent to the gaugeNumber of gauge polls since last reset Number of gauge polls which resulted in an errorOut 8315 L&J Tankway Software Description TankGate Interface Installation Safety Guidelines General Safety GuidelinesInstallation Mounting the TankGate inside the enclosure Mounting the TankGateSelect the Unit address Wiring Up PowerInstalling Communications Mounting the EnclosureEstablishing Host Communications Power-UpRS-485 Communications Initial system verificationInstallation TankGate Interface Executing ViewRTU Installing ViewRTUOverview System RequirementsViewRTU Version Selection dialog ViewRTU window ViewRTU Menu BarFile Menu Point Menu Select Point to Add dialog box EditEdit Point selection dialog Edit Point dialog DeletePoint deletion dialog Config Menu Download Database to RTUUpload Database from TankGate Creating a Password To enter the passwordCommunications Menu Changing the PasswordChanging the Password PC SetupStatus Port Communications Setup dialogOptions Menu ConnectTankGate search dialog Import All Convert Configuration FilesConvert ViewRTU versions dialog Export AllHelp Menu Using ViewRTUConfiguring Single Points Edit Digital Point dialog Edit Point Window Push-buttonsMinimize Previous Minimizing the Edit Point WindowConnections NextEdit point parameter value dialog To modify a ValueUpload To modify a valueAdding Multiple Points Configuring Multiple PointsTo modify a Reference Edit point parameter reference dialogAdding Multiple Points Spreadsheet ModePaste Point MenuEdit Menu CopyPaste & Dnld Set ValueSet Value with Auto Increment Options Menu ImportExport View Hide Row/ColParameter Type Description Unhide All Creating and Editing ConnectionsDisplaying the Point Connections window Point Connections WindowTo create a Connection Using ViewRTU TankGate Interface Indicator Condition Run indicator1.3 TXD/RXD LEDs Using the TankGate Push-buttonsCommunications indicator LED Displays under Abnormal ConditionsPress the Reset button Performing a Hard ResetSet the ID DIP switch to the desired addresses Replacing a defective component or module MaintenanceTroubleshooting TankGate Interface 102 Ordering Structure Nema 4 Enclosure Ordering Structure Remote Terminal Unit TankGateModbus Map Value12 Fpreg 3034 3094 8300 Your official representative Your offical representative