Hello Guest it is April 18, 2024, 07:08:11 AM

Author Topic: Weird problems.  (Read 796 times)

0 Members and 1 Guest are viewing this topic.

Weird problems.
« on: December 31, 2019, 03:20:28 PM »
I'm working on a lathe at the moment and I'm running into some issues.
1.  Zero Brane won't let me step through and debugg a macro.  I start debugging and it just runs through it.  It doesn't even really run through it because it doesn't show any results that I have requested in the macro (mc.mccntlSetLastErorr()).  I have to run the macro from MDI to test it, it is very cumbersome.  This happened on a mill I worked on recently as well. Both running Mach4 Build 4300.

2.  I'm trying to get a visual representation of what Gear the lathe is in.  I have a dc linear actuator that changes the spindle gear.  This actuator has two limit switches on it to tell my PLC when it reaches it's limit to shut off the gear motor, I have two LED's set up in Mach to monitor the input state.  This isn't working correctly.  It doesn't update unless I go into Machine Config and exit out of the config screen then it will update the LEDs.  I have no idea why this isn't changing correctly. 

3.  I tried to bypass this and just force the LED value to 1 but the code I use to do this on other machines doesn't seem to work. 
scr.SetProperty ("ledTest", "Value", 1 or 0)
I try and run this in a macro and it doesn't change anything. 

4.  How do you get the state of an input?  Usually I get the handle, get the state of the handle and then use that state.  I have done this a lot in the past, but it isn't working right on this lathe.  I'm wondering if it has something to do with the Zero Brane editor.

Anyone have any ideas on these issues?

Chad Byrd
Re: Weird problems.
« Reply #1 on: December 31, 2019, 04:26:59 PM »
I just found out (by happy accident) that the debugging will work if you choose "Open script editor" and not "Edit debug scripts".
I am also able to get the state of an input now.  I'm not sure what I changed, but it works now so I'm happy. 
The LEDs still don't work correctly all the time though.
Chad Byrd
Re: Weird problems.
« Reply #2 on: January 01, 2020, 08:25:15 AM »
A little off subject but the "missing .dll" problem I had was only in "Edit debug scripts" and not in "Open script editor". Also the Zero Brane F11 key doesn't work for me in Mach4 Build 4300.