Y_YA_ControllerStatus
- CPUload and usage.
- IEC 61131 memory utilization.
- Board temperature.
- Removable memory status.
- Ram disk usage.
- LED status.
- Ethernet status.
Parameters
| * | Parameter | Data Type | Description | Default |
|---|---|---|---|---|
| VAR_IN_OUT | ||||
| V | Data | Yt_YA_SystemDataStruct | DataStruct containing all the system data the FB calls | |
| VAR_INPUT | ||||
| B | Execute | BOOL | Upon the rising edge of the Execute input, all other inputs are read, and the function block becomes operational. If an input needs to be modified, the value with have to be changed, and the Execute will have to be triggered again. | FALSE |
| E | Mask | LWORD | Used to select what data gets updated. Generally, choosing more restrictive amounts of data to update improves completion time. (Optional) | LWORD#16#0 |
| VAR_OUTPUT | ||||
| B | Done | BOOL | The Done output is set to TRUE when the function has read the system status information successfully. This output resets when Execute becomes FALSE. | FALSE |
| B | Busy | BOOL | The Busy output is set to TRUE upon the rising edge of the Execute input, and set to FALSE when Done or Error become TRUE. Indicates that the function is still performing a task. | FALSE |
| B | Error | BOOL | The Error output is set to TRUE if an error has occurred during the execution of the function block. This output is cleared when Execute becomes FALSE. | FALSE |
| B | ErrorID | UINT | The ErrorID output provides the identifier of the error when there is an active error in the function block execution. Output is cleared when Execute becomes false. | UINT#0 |
Data Object Components:
Mask # | PBCL StrIndent | Description | Toolbox Support |
0 | Status.Memory.Usage.Percent | Amount of memory used, as a percentage of used and free memory | 2024.3 |
1 | Status.Memory.Usage.Percent.Actual | Amount of memory used, as a percentage of used, free, and reclaimable memory | 2024.3 |
2 | Status.ProgramMemoryIEC.Usage.Percent | Percent used of memory dedicated to user code | 2024.3 |
3 | Status.DataMemoryIEC.Usage.Percent | Percent used of memory dedicated to variables | 2024.3 |
4 | Status.RetainMemory.Usage.Percent | Percent of retain memory that is in use | 2024.3 |
5 | Status.Board.Temperature.Centigrade | PCB temperature sensor read in degrees Celcius | 2024.3 |
6 | Status.RemoveableStorage.1.Present | Status of SD card slot | None |
7 | Status.RemoveavleStorage.1.State | State of Storage within SD card slot | None |
12 | Status.RamDisk.1.Usage.Percent | Percent of RAM disk used | 2024.3 |
13 | Status.RamDisk.1.Usage | Amount of data used on RAM disk | 2024.3 |
18 | Status.Leds.Main | RDY light on Device Cover | None |
19 | Status.Leds.Runtime.Run | Run LED on Device Cover | 2024.3 |
20 | Status.Leds.Runtime.Fail |
| None |
21 | Status.Leds.Runtime.Debug | None | |
22 | Status.Leds.Runtime.Error | Error LED on Device Cover | 2024.3 |
23 | Status.Leds.Ecat.Error | Link not available | 2024.3 |
24 | Status.Leds.Ecat.Run | Operating | 2024.3 |
25 | Status.Leds.Io.Error | Configuration/bus failure | 2024.3 |
26 | Status.Leds.Pn.Controller.Error | No link status or no 100 MBit/s or full duplex link available while PN controller is enabled | 2024.3 |
27 | Status.Leds.Pn.Device.Error | No active PN communication and no link available | 2024.3 |
32 | Status.Interfaces.Ethernet.1.1.Baudrate | 2024.3 | |
33 | Status.Interfaces.Ethernet.1.1.Duplex | 2024.3 | |
34 | Status.Interfaces.Ethernet.1.1.Link | 2024.3 | |
35 | Status.Interfaces.Ethernet.1.2.Baudrate | 2024.3 | |
36 | Status.Interfaces.Ethernet.1.2.Duplex | 2024.3 | |
37 | Status.Interfaces.Ethernet.1.2.Link | 2024.3 | |
44 | Interfaces.Ethernet.1.Ip | IP address of the controller as a string | 2024.3 |
45 | Interfaces.Ethernet.1.Subnet | Subnet config of the controller as a string | 2024.3 |
46 | Interfaces.Ethernet.1.DefaultGateway | Ethernet gateway config of the controller as a string | 2024.3 |
51 | Status.Cpu.1.Load.Percent | Current percent of load on CPU | 2024.3 |
Notes
- Using this block simultaneously with PBCL_SysDeviceStatus and PBCL_SysDeviceSetting is not supported. They must be allowed to complete their operations before moving on to another command, due to the overlap in the memory each one reads/writes.
- General behavior this block is to refresh Data struct, once on each rising edge of execute. There is a processing time to fetch the data, so it must be allowed for Done to become true, before another Execute will have any effect.
- This can be a bit processor intensive, so it is recommended to not run this in tasks running at < 4ms. It takes multiple scans to obtain all of the data, so this block takes longer in a slower task as well.
- This FB is intended for collecting status information about various systems within the Controller. The Data variable is preformatted to be more readable and accessible, and this FB populates all or part of that structure to make accessing diagnostic information easier.
- It is possible to set a mask to limit the items within Data that are updated. When only certain portions of information are needed, this makes it possible to speed up the execution.
Error Description
See the Function Block ErrorID List.
Example
If 'Valid' accompanying a data value within the Y_YA_ControllerStatus Data struct is False, this means that the value was not read and not updated. Only rely on data that is 'Valid'.