What are the names in Infosys
|TwinCAT PLC Library: Utilities BC|
The "ReadWriteTerminalReg" function block enables more convenient access to the terminal registers via the status / control byte of the terminal channel (register communication). In the standard operating mode, the data inputs / outputs of the intelligent terminals (e.g. an analog output terminal) are used to exchange the analog output data. A handshake via the status / control byte enables register access; the data input / output variables are used to transfer the register values. The terminal must be mapped as a complex PLC terminal so that the status / control byte is visible in the process image. The terminal registers cannot be accessed if the terminal has been mapped as a compact PLC terminal or as a fieldbus terminal (process image of the terminal is not visible to the bus controller).
The register with the number REGNO is read or written to the register via a positive edge at the READ or WRITE input. The register write protection is canceled by the function block in the event of a write access and is then set again. When a register is written to, the new register value is read and is available at the CURRREGVALUE output. In order to permanently save changes to the register values, the voltage supply of the coupler must be interrupted or a software reset of the coupler must be carried out.
STATE: Status byte of the terminal channel.
DATAIN: Data input word of the terminal channel.
REGNO: Number of the register to which read or write access is to take place.
READ: The block is activated via a positive edge at this input and the current register value is read. If successful, the register value is available in the output variable CURRREGVALUE.
WRITE: The block is activated via a positive edge at this input and the value of the NEWREGVALUE input variable is written to the REGNO register. The current value of the register is then read and, if successful, is available in the output variable CURREGVALUE.
TMOUT: Specifies the timeout period that must not be exceeded when executing the function.
NEWREGVALUE: Data word that is to be written in the register with the number REGNO during a write access.
CONTROL: Control byte of the terminal channel.
DATAOUT: Data output word of the terminal channel.
BUSY: When the function block is activated, this output is set and remains set until the execution of the function has been completed.
ERR: If an error occurs when executing the function, this output is set after the BUSY output has been reset.
ERRID: Supplies the error number when the ERR output is set.
CURREGVALUE: In the event of a successful read or write access, the current register value is output via the variable.
|Error number||Error Description|
|0x100||Timeout error. The permitted execution time has been exceeded.|
|0x200||Parameter error (e.g. with an illegal register number).|
|0x300||The value read differs from the value written (write access to this register may not be allowed or may have failed)|
Examples for a call in FBD:
State AT% IB0: BYTE;
Control AT% QB0: BYTE;
DataIn AT% IW2: WORD;
DataOut AT% QW2: WORD;
In example 1, the terminal designation is read from register 8 of an analog output terminal. The variables State, Control, DataIn and DataOut are linked with the corresponding IO variables of the terminal in the TwinCAT System Manager. The terminal designation is: KL4002.
In example 2, user scaling is activated in the feature register (register 32) of an analog KL4002 output terminal. The new value of the feature register is then read by the function block and can be accessed via the output variable CURREGVALUE to be checked.
|Development environment||Target platform||PLC libraries to be linked|
|TwinCAT v2.7.0 and higher||BCxxxx (165)||Standard.Lb6, PlcSystemBC.Lb6, TcPlcUtilitiesBC.Lb6|
- How does SnapChat's Snapcode work
- Are infrasound and paranormal activity linked?
- Is imperialism a consequence of the industrial revolution?
- Can someone define sexism
- What do unbelievers believe in?
- Beyond money, what are you working towards
- How safe is Brooklyn College
- What are the characteristics of demanding microorganisms
- Is pure iron water-soluble
- What's the best typography magazine
- What's so bad about north Philadelphia
- How can one have religious certainty?
- Can bcc be hacked in email
- Helps EduPristine with the placement
- What is a 1619 project
- What's your favorite song from the 60s
- Why is moral development important
- What feels good
- There is black magic in Lesotho
- Australian rules football is based on rugby
- Hungarian sweet paprika is hot
- What are the names in Infosys
- Infinity can be negative
- Why do I need a web server