Seems to be working great
This commit is contained in:
+13
-42
@@ -1,6 +1,6 @@
|
||||
# atMb 0.4 API reference
|
||||
# atMb 0.8 API reference
|
||||
|
||||
Generated from `library/atMb-Threaded.export`. Declarations below are the current source. Use USER-GUIDE.md for lifecycle, units and examples. Internal fields remain exposed where required by existing IEC inheritance; do not overwrite engine state from application code.
|
||||
Generated from `library/atMb-OnlineChange.export`. Declarations below are the current source. Use USER-GUIDE.md for lifecycle, units and examples. Internal fields remain exposed where required by existing IEC inheritance; do not overwrite engine state from application code.
|
||||
|
||||
## atMbCall_cext
|
||||
|
||||
@@ -106,7 +106,7 @@ END_TYPE
|
||||
|
||||
## ModbusMaster.ClientBase
|
||||
|
||||
Shared abstract client scheduler and registry. Call concrete client every scan; worker handles transaction progress. Exposes aggregated stats and toString.
|
||||
Shared abstract client scheduler and registry. Call concrete client every scan; IEC task handles transaction progress. Exposes aggregated stats and toString.
|
||||
|
||||
```iecst
|
||||
{attribute 'monitoring_display' := 'toString'}
|
||||
@@ -564,7 +564,7 @@ VAR_INPUT
|
||||
sentCnt : UDINT;
|
||||
replyCnt : UDINT;
|
||||
exceptionCnt : UDINT;
|
||||
totalValidDuration : ULINT; // Sum of successful worker transaction durations, milliseconds.
|
||||
totalValidDuration : ULINT; // Sum of successful transport transaction durations, milliseconds.
|
||||
END_VAR
|
||||
VAR
|
||||
previousOnline : BOOL;
|
||||
@@ -774,7 +774,7 @@ END_VAR
|
||||
|
||||
## ClientBase.FB_exit
|
||||
|
||||
Lifecycle resource release. Worker is joined by component exit; context hooks close their owned handle. Use public release for application shutdown.
|
||||
Lifecycle resource release. context hooks close their owned handle. Use public release for application shutdown.
|
||||
|
||||
```iecst
|
||||
METHOD FB_exit : BOOL
|
||||
@@ -815,7 +815,7 @@ END_VAR
|
||||
|
||||
## ClientBase.processCycle
|
||||
|
||||
Refresh scan lease, read completed results, process request completions, acknowledge result and select next transaction. OS I/O progression is performed by the worker.
|
||||
Refresh scan lease, read completed results, process request completions, acknowledge result and select next transaction. Transport I/O progresses during the owning PLC call.
|
||||
|
||||
```iecst
|
||||
METHOD processCycle
|
||||
@@ -826,7 +826,7 @@ END_VAR
|
||||
|
||||
## ClientBase.ensureContext
|
||||
|
||||
Check 0.4 worker capability, allocate/configure/enable a context. A nonzero handle does not imply connectivity. Old components are rejected with error 259.
|
||||
Allocate/configure/enable a context. A nonzero handle does not imply connectivity. Old components are rejected with error 259.
|
||||
|
||||
```iecst
|
||||
METHOD PROTECTED ensureContext : BOOL
|
||||
@@ -1138,7 +1138,7 @@ METHOD PUBLIC invalidateData
|
||||
|
||||
## RequestBase.finishRequest
|
||||
|
||||
Map a completed result and write uncertainty, collect worker timing/read age, update reply/exception/timeout counters and completion flags. Successful reads become valid; errors retain old array values.
|
||||
Map a completed result and write uncertainty, collect transport timing/read age, update reply/exception/timeout counters and completion flags. Successful reads become valid; errors retain old array values.
|
||||
|
||||
```iecst
|
||||
METHOD finishRequest
|
||||
@@ -1239,7 +1239,7 @@ PROPERTY reqBusy : BOOL
|
||||
|
||||
## RequestStats.reqDone
|
||||
|
||||
On successful executing completion, increment saturated success counters, clear errors and execution, update display. Worker supplies duration.
|
||||
On successful executing completion, increment saturated success counters, clear errors and execution, update display. Transport supplies duration.
|
||||
|
||||
```iecst
|
||||
PROPERTY reqDone : BOOL
|
||||
@@ -1307,7 +1307,7 @@ END_VAR
|
||||
|
||||
## ModbusSlave.FB_exit
|
||||
|
||||
Lifecycle resource release. Worker is joined by component exit; context hooks close their owned handle. Use public release for application shutdown.
|
||||
Lifecycle resource release. context hooks close their owned handle. Use public release for application shutdown.
|
||||
|
||||
```iecst
|
||||
METHOD FB_exit : BOOL
|
||||
@@ -1327,7 +1327,7 @@ METHOD FB_reinit : BOOL
|
||||
|
||||
## ModbusSlave.serverCall
|
||||
|
||||
Private synchronous server/worker ABI adapter using server staging/status arrays.
|
||||
Private synchronous server ABI adapter using server staging/status arrays.
|
||||
|
||||
```iecst
|
||||
METHOD PRIVATE serverCall : UDINT
|
||||
@@ -1339,7 +1339,7 @@ END_VAR
|
||||
|
||||
## SlaveTCP.FB_exit
|
||||
|
||||
Lifecycle resource release. Worker is joined by component exit; context hooks close their owned handle. Use public release for application shutdown.
|
||||
Lifecycle resource release. context hooks close their owned handle. Use public release for application shutdown.
|
||||
|
||||
```iecst
|
||||
METHOD FB_exit : BOOL
|
||||
@@ -1359,7 +1359,7 @@ METHOD FB_reinit : BOOL
|
||||
|
||||
## SlaveTCP.serverCall
|
||||
|
||||
Private synchronous server/worker ABI adapter using server staging/status arrays.
|
||||
Private synchronous server ABI adapter using server staging/status arrays.
|
||||
|
||||
```iecst
|
||||
METHOD PRIVATE serverCall : UDINT
|
||||
@@ -1539,32 +1539,3 @@ STRUCT
|
||||
END_STRUCT
|
||||
END_TYPE
|
||||
```
|
||||
|
||||
## ModbusMaster.Worker
|
||||
|
||||
Optional single global worker controller. CPU -1 restores inherited mask; nonnegative selects an OS CPU. Affinity error is explicit. Configure watchdog longer than expected scan gaps.
|
||||
|
||||
```iecst
|
||||
FUNCTION_BLOCK Worker
|
||||
VAR_INPUT
|
||||
in_cpu : DINT := -1; // -1 restores inherited affinity; >=0 selects an OS CPU ID.
|
||||
in_interval : TIME := T#1MS; // Worker sleep 1..20 ms; not a hard real-time guarantee.
|
||||
in_watchdog : TIME := T#2S; // 100 ms..60 s; closes contexts whose FB stops scanning.
|
||||
END_VAR
|
||||
VAR_OUTPUT
|
||||
out_running : BOOL;
|
||||
out_error : BOOL;
|
||||
out_errorCode : UDINT;
|
||||
out_osError : UDINT;
|
||||
out_cpu : DINT := -1;
|
||||
out_cycles : ULINT;
|
||||
END_VAR
|
||||
VAR
|
||||
status : ARRAY[0..23] OF UDINT;
|
||||
configured : BOOL;
|
||||
lastCpu : DINT;
|
||||
lastInterval : TIME;
|
||||
lastWatchdog : TIME;
|
||||
command : UDINT;
|
||||
END_VAR
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user