Table of Contents
EtherCAT Read
This block is currently a beta version. If you are using this block, we would appreciate any feedback at tech@quanser.com. |
Reads the specified variables from the EtherCAT process image.
Library
MATLAB Command Line
Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window:
qc_open_library('quarc_library_beta/Fieldbus/EtherCAT')Description
The EtherCAT Read block reads the specified variables from the process image every time the block is executed. It does not send or receive packets from the EtherCAT slaves but instead reads from the process image in the EtherCAT stack. The EtherCAT stack updates the process image at the sampling rate specified in the EtherCAT Master block.
This block can read more than one variable at the same time. The variables are read from the process image immediately. Using this block is more efficient than using separate blocks for each variable.
Input Ports
This block has no input ports.
Output Ports
The number of output ports depends on the number of variables specified in the Variables list. Each variable in the list is assigned a different output port, in the order that they appear in the list. The data type and dimensions of each output are determined by the data type and dimensions of the corresponding variable.
Data Type Support
The EtherCAT Read block supports the following EtherCAT data types, and arrays of these types:
EtherCAT Type
|
Simulink type
|
Range
|
Comment
|
---|---|---|---|
BOOL
|
boolean | 0..1 | logical type |
BYTE
|
uint8 | 0..255 | |
WORD
|
uint16 | 0..65535 | |
DWORD
|
uint32 | 0..4294967295 | double word |
SINT
|
int8 | -128..127 | signed "short" integer |
USINT
|
uint8 | 0..255 | unsigned "short" integer |
INT
|
int16 | -32768..32767 | signed integer |
UINT
|
uint16 | 0..65535 | unsigned integer |
DINT
|
int32 | -2147483648..2147483647 | signed "double" integer |
UDINT
|
uint32 | 0..4294967295 | unsigned "double" integer |
REAL
|
single | ±3.402823e38 | single-precision floating-point |
LREAL
|
double | ±1.79769313486232e308 | double-precision floating-point |
TIME
|
uint32 | 0..4294967295 | milliseconds |
TIME_OF_DAY (TOD)
|
uint32 | 0..4294967295 | seconds |
DATE
|
uint32 | 0..4294967295 | seconds since January 1, 1970 |
DATE_AND_TIME (DT)
|
uint32 | 0..4294967295 | seconds since January 1, 1970 |
AMSADDRESS
|
uint8 | 0..255 | 48 bit address presented as a 6-vector of bytes |
Parameters and Dialog Box
The Main pane of the dialog appears is shown above.
EtherCAT master
The name of the EtherCAT master whose process image variables will be read. EtherCAT masters are configured using the EtherCAT Master block. Place an EtherCAT Master block in your diagram to add an EtherCAT master to the list.
Variables
The variables to read. The number of variables available depends on the EtherCAT master selected and the number of process variables defined in its corresponding XML configuration file. The output units depend on the variables selected. There is one output port for each variable in the list and the output ports are assigned in the same order as the variable list.
To add a variable to the list, choose the variable in the pop-up menu (combobox) that appears immediately below the list of variables. Then click on the
button to add the selected variable to the end of the list. The data type and length of the variable will be displayed in the information area to the right of the list of variables.To remove a variable from the list, click on the variable in the list. (Do not select the variable in the pop-up menu that appears immediately below the list of variables.) Then click on the Ctrl key to select more than one variable in the list and the Shift key to select a range of variables in the list. Then click on the button to remove all the selected variables from the list.
button to remove the selected variable from the list. Use theSample time
The sample time of the block. A sample time of 0 indicates that the block will be treated as a continuous time block. A positive sample time indicates that the block is a discrete time block with the given sample time.
A sample time of -1 indicates that the block inherits its sample time. Since this is a source block, only inherent the sample time when it is placed in a conditionally executed subsystem, like a Triggered or Enabled Subsystem, or in a referenced model.
The default sample time is set to qc_get_step_size, which is a QUARC function that returns the fundamental sampling time of the model. Hence, the default sample time is a discrete sample time with the same sampling time as the fixed step size of the model.
Targets
Target Name |
Compatible* |
Model Referencing |
Comments |
---|---|---|---|
No |
No |
Not currently supported. |
|
No |
No |
Not currently supported. |
|
No |
No |
Not currently supported. |
|
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
No |
No |
Not currently supported. |
|
No |
No |
Not currently supported. |
|
No |
No |
Not currently supported. |
|
No |
No |
Not currently supported. |
|
No |
No |
Not currently supported. |
|
No |
No |
Not currently supported. |
|
No |
No |
Not currently supported. |
|
Yes |
Yes |
Last fully supported in QUARC 2018. |
|
Rapid Simulation (RSIM) Target |
No |
No |
Not currently supported. This block does nothing during rapid simulation. |
S-Function Target |
No |
N/A |
Old technology. Use model referencing instead. |
Normal simulation |
No |
No |
Not currently supported. This block does nothing during normal simulation. |
See Also
Copyright ©2024 Quanser Inc. This page was generated 2024-10-17. Submit feedback to Quanser about this page.
Link to this page.