Bytecode interpreter (by Süleyman Canan)
Hi,
I am trying to use the bytecode interpreter.
I was able to compile it and work fine.
But when I tried to run it with a ladder program compile to bytecode I get this message
"special interface variables 'a' or 'osc' not used in prog "
what it means
why it doen not interprete my file"
a help will be very appreciated many thanks
(no subject) (by Jonathan Westhues)
Have you read the comments about the $$bits and $$int16s sections, and how I/O is handled through specially-named variables?
In brief, the sample interpreter expects that your ladder program receives an input 'Xosc', and outputs an integer variable 'a', using that mechanism. In a real interpreter, you would define different variable names, corresponding to the I/O that's physically available (digital inputs and outputs, A/Ds, D/As, UARTs, etc.) in your system.
Bytecode interprwter (by Süleyman Canan)
Many thanks
Is the circuit should be like that in order to run
The interpreter demo
An input contact Xnew named Xosc and output coli Ynew named Ya connected in series will do the job ?
Best regards
(no subject) (by Jonathan Westhues)
The output 'a' is an integer variable (e.g., defined by setting it to some constant value with a MOV instruction), not a bit variable. Otherwise, yes.
(no subject) (by Süleyman Canan)
Many thanks Jonathan, job done