You clearly did not understand what I said. I would suggest you read it again.
It's not so complicated as someoane may think !
You clearly did not understand what I said. I would suggest you read it again.
Yes, I see it. My point was that there is many mixed/hybrid control problems where there is need of both, state (on/off/limit-value) and continuous time. How usefull tool (isn't that what statemachine theory is?) statemachine are to those. That was directed mainly to Sioan.PIDs are a continuous process. Controlling temperature is a continuous process. In machine control there is a lot of "do this" "wait for this to be done" then "do that" then "wait for that to be done" then "do the next thing" then "wait for the next thing to be done" etc then repeat for the next part.
Vartile, can you see the difference between a PID and machine control?
Sioan is just trying to screw with your mind.
SFCs or Sequential Function Charts are basically Moore state machines. Once you are in a state you stay there until a transition has occurred to go to the next state. Our motion controller has a build in state machine that functions in a similar way to SFCs. It looks different but pretty much works the same way.
Yes, digital is discrete, if that is what you meant? Or did you mean that you calculate it step by step? or both?Sure that a PID is a finite state machine (in a loop) ! ... isn't it DIGITAL ?
The line count depends on the language used (..if there is lines)? Can you give example of PID made out of statemachine diagrams?I beg your pardon !
A (digital) PID is very well at a normal level a finite state machine : ( is a just a finite number of ... CPU instructions/states the ... PID)
How many lines of code need you for ...
someone have to really see the FSM states between the lines of his code ... to know about ... cybernetics
Not much snow in Graz these days?
(you shouldn't eat those mushroms)
Dr. Watson
- Every algorithm(!) can be represented as a (virtual)state machine.
FUNCTION FC 89 : DINT
TITLE =Factorial
VERSION : 0.1
VAR_INPUT
x : DINT ;
END_VAR
VAR_TEMP
y : DINT ;
z : DINT ;
END_VAR
BEGIN
NETWORK
TITLE =
L #x;
L 0;
==D ;
JC ret1;
TAK ;
L 1;
==D ;
JC ret1;
L #x;
+ L#-1;
T #y;
CALL FC 89 (
x := #y,
RET_VAL := #z);
L #z;
L #x;
*D ;
T #RET_VAL;
BEU ;
ret1: L 1;
T #RET_VAL;
END_FUNCTION
I'd be very interested to see the state machine implementation of the algorithm used in the following function for calculating factorial.
...
To my statements , I have one thing ONLY to say:
- Every algorithm(!) can be represented as a (virtual)state machine.
I'd be very interested to see the state machine implementation of the algorithm used in the following function for calculating factorial.
Code:FUNCTION FC 89 : DINT TITLE =Factorial VERSION : 0.1 VAR_INPUT x : DINT ; END_VAR VAR_TEMP y : DINT ; z : DINT ; END_VAR BEGIN NETWORK TITLE = [COLOR="Magenta"]L #x;[/COLOR] L 0; ==D ; JC ret1; TAK ; L 1; ==D ; JC ret1; L #x; + L#-1; T #y; CALL FC 89 ( x := #y, RET_VAL := #z); L #z; L #x; *D ; [COLOR="Magenta"]T #RET_VAL; [/COLOR] BEU ; ret1: L 1; [COLOR="Magenta"]T #RET_VAL;[/COLOR] END_FUNCTION
FUNCTION FC 89 : DINT
TITLE =Factorial
VERSION : 0.1
VAR_INPUT
x : DINT ;
END_VAR
VAR_TEMP
y : DINT ;
z : DINT ;
END_VAR
BEGIN
NETWORK
TITLE =
[COLOR="Magenta"] L #x; [/COLOR]
T #y; [COLOR="Silver"]//y = x[/COLOR]
T #z; [COLOR="silver"]//z = x[/COLOR]
L 1;
>I ;
JCN B;
A: L #y;
+ L#-1;
T #y; [COLOR="silver"]//y = y - 1[/COLOR]
L #z;
*D ;
T #z; [COLOR="Silver"]//z = z * y[/COLOR]
L #y;
L L#1;
>I ;
[COLOR="Blue"][B]JC A; [/B][/COLOR]
L #z;
[COLOR="Magenta"]T #RET_VAL; [/COLOR]
BE ;
B: L L#1;
[COLOR="Magenta"]T #RET_VAL;[/COLOR]
END_FUNCTION
- Every algorithm(!) can be represented as a (virtual)state machine.