Hi Craig,
believe it or not we've had a genuine NE gale and about 3in of rain over the last 24 hours, not complaining about the rain!
“MachDuino”. I have tried all three options with no success. My screen set is wx4
The name is the name of the screenset you are using. wx4 is a default screenset that ships with Mach4. It is recommended that
you copy it and rename it to something individual say 'Craigwx4Set' or similar. Any changes to the set say buttons, macros and
so on will be saved to that set. If you update Mach4 with a later build wx4 will be overwritten and any changes you made to it
will be lost whereas your individually named screenset will be retained. The underlying code that selects and loads the screen is LUA
and LUA is case sensitive, your screenset is case matched but otherwise follows the rules for LUA variables, ie doesn't start with a
number or a LUA keyword.
You mention 0 to 4096, DTG’s table goes from 0 to 1023, could that have anything to do with it,
This depends on the PoKeys board. If memory serves it uses a 12 bit ADC, ie 0 to 4096. If it uses a 10 bit ADC, like DTGs Arduino,
the range would be 0 to 1024.
The other thing is the name of the register, which goes into those lines inserted into the PLC script
Most of the buttons and switches you have used on your control board have two distinct states. Mach4 runs the signal script each and
every time a signal changes state. You don't have to poll them every once and a while. An analogue signal is converted to a digital number
and communicated via Modbus by TCP/IP and the Modbus function runs every 25ms or so. The Modbus plugin creates and defines a register
in the Regfile and the register is updated with the digital representation of your analogue value everytime the Modbus function runs ie every 25ms.
You can read the register any time you like but I imagine you wish to see it live so you would put the code necessary to read and display it in the
PLC script as it runs every 40ms or so.
Craig