Hello there, Just looking for a couple tips to point me in the right direction. Question one, can I share a variable from one JS macro to another macro run second? Two, Are there any limits to building a websocket (to a deferent controller) in JS/chromium from inside a macro?
You can set global variables yes Window Variable JavaScript | Declare Global Variables inside a function We don't impose any limits. You can overwrite existing functions, anything you need. We kept everything global so its easy to access / overwrite etc That gets trickier. the nodejs backend handles comms. Not the frontend. To cater for a 3rd party firmware would need more than Macros. What did you have in mind?
Great, thanks guys. I guess i should have tested globals myself first... I have a bit of a franken-setup where I control a mobile controller via WS + Web GUI from a stationary workstation. Its used for a couple different devices and i physically move it between them as needed. I guess a websocket via Macro would have just been a shortcut really.... I've dug in a bit tonight. I figured out how to re-compile CONTROL, add some custom sections and started up an addition WebSocket connection. This is the way!
Hey guys, I've gotta saying developing some custom features into CONTROL has been great! The design is layed out so well and easy to follow. I've managed to developed a solid set of custom features in days and have them working seamlessly right inside CONTROL itself. Part 1, An independent A axis that also has the ability to hook into the main gcode jobs and run as a true 4th axis. What a great product Peter! Thanks.