Home
Prox / RFID
Verichips
Ladder Logic
[interfacing] †
Tube Joints
Key Code From Photo
SolveSpace (3d CAD)
SketchFlat (2d CAD)
Photographs
Miscellany
Resume / Consulting
Contact Me

LDmicro Forum - Bytecode interpreter

(you are viewing a thread; or go back to list of threads)

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
Wed Apr 6 2016, 10:32:17
(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.
Wed Apr 6 2016, 15:02:39
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
Wed Apr 6 2016, 17:12:48
(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.
Wed Apr 6 2016, 17:18:46
(no subject) (by Süleyman Canan)
Many thanks Jonathan, job done
Thu Apr 7 2016, 08:49:24
Post a reply to this comment:
Your Name:
Your Email:
Subject:
(no HTML tags; use plain text, and hit Enter for a line break)
Attached file (if you want, 5 MB max):