Raptor:Modbus Master: Difference between revisions

From NewEagleWiki
Jump to navigation Jump to search
No edit summary
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[RaptorWiki|Return to the main Raptor page]]
[[RaptorWiki|Return to the main Raptor page]]


[[Raptor:Raptor-Dev Modbus-Library|Return to Modbus Library page]]
[[Raptor-Dev-Modbus-Library|Return to Modbus Library page]]


[[File:RaptorAdjustment.jpg|right|frame|Raptor Adjustment]]
[[File:RaptorModbus.jpg|right|frame|Raptor Modbus Master]]


== Description ==
== Description ==
<p>The Raptor™ adjustment block is used to make values available within the calibration tool. An adjustment is a value which typically written from the calibration tool.</p>
<p>This block acts as a [https://en.wikipedia.org/wiki/Modbus Modbus] master on a serial bus. The master requests data from slave device(s).</p>


== Inputs ==
== Inputs ==
Line 14: Line 14:
! scope="col" style="width: 15%;"|Type
! scope="col" style="width: 15%;"|Type
! scope="col" style="width: 70%;"|Description
! scope="col" style="width: 70%;"|Description
|-
! Node
| uint16
| The address of the slave device to request from.
|-
! Register Address
| uint16
| The register address to be read.
|-
! Read length
| uint16
| The number of registers to be read.
|-
|}
|}


== Outputs ==
== Outputs ==
Line 22: Line 36:
! scope="col" style="width: 15%;"|Type
! scope="col" style="width: 15%;"|Type
! scope="col" style="width: 70%;"|Description
! scope="col" style="width: 70%;"|Description
|-
! RegisterRead()
| trigger
| The trigger port will fire when a valid response is received.
|-
! Node Address
| uint16
| The address of the responding slave.
|-
! Data Address
| uint16
| The register address for the start of the read.
|-
! data
| uint16
| The data returned from the slave.
|-
|}
|}


Line 31: Line 62:
! scope="col" style="width: 70%;"|Description
! scope="col" style="width: 70%;"|Description
|-
|-
! Name
! Serial Bus Name
| String
| This is the name of that will appear in the calibration tool. The name must be a valid C identifier.
|-
! Name Source
|
| Chooses whether the name should come from the parameter or output wire name.
|-
! Initial Value
| Number or Vector or Matrix
| This is the initial adjustment value.
|-
! Data Type
|
| Specifies the data type of the adjustment and output port.
|-
! Storage
|
| Specifies the storage class of the data.
|-
! Display As
|
| Specifies how to display the value in the calibration tool.
|-
! Gain
| Number
| This controls the scaling used to display the data in the cal tool.
display value = (Gain * actual value) + Offset
|-
! Offset
| Number
| This controls the scaling used to display the data in the cal tool.
display value = (Gain * actual value) + Offset
|-
! Max
| Number
| Sets the maximum value that can be set in the calibration tool.
|-
! Min
| Number
| Sets the minimum value that can be set in the calibration tool.
|-
! Format
| Format String
| Sets the display format to use in the calibration tool.
|-
! Enumeration Definition
| Cell Array of strings or struct array
| Provides the mapping of string representation to integer value for the enumeration.
|-
! Unit Text
| String
| String
| Sets the unit text that is displayed in the calibration tool.
| The name of the serial bus that should be utilized.
|-
|-
! Help Text
! Data Requests
| String
| String
| Sets the help text that is displayed in the calibration tool.
| A list of data request that should be requested. See: modbus_requests_example.m for the format.
|-
|-
! Access Level
! Use Inputs
|  
| checkbox
| Sets the access level of this item in the calibration tool
| If checked the block will use input ports for the data requests.
|-
|-
! Function
| String
| Sets the location where the variable appears in the calibration tool. Use raptor_xcp_function(gcb) to create a function based on the variables location in the model.
|}
|}

Latest revision as of 21:21, 28 November 2016

Return to the main Raptor page

Return to Modbus Library page

Raptor Modbus Master

Description

This block acts as a Modbus master on a serial bus. The master requests data from slave device(s).

Inputs

Input Type Description
Node uint16 The address of the slave device to request from.
Register Address uint16 The register address to be read.
Read length uint16 The number of registers to be read.


Outputs

Output Type Description
RegisterRead() trigger The trigger port will fire when a valid response is received.
Node Address uint16 The address of the responding slave.
Data Address uint16 The register address for the start of the read.
data uint16 The data returned from the slave.

Parameters

Parameter Type Description
Serial Bus Name String The name of the serial bus that should be utilized.
Data Requests String A list of data request that should be requested. See: modbus_requests_example.m for the format.
Use Inputs checkbox If checked the block will use input ports for the data requests.