Art
Thanks will test the close().
I'm not sure but sleep on it, and went back to testing voltage now the SSR is working fine 0 to 5v..
I think you may be right the pokeys may not be able to handle the voltage output to relays from the LCD pins.. I tested again and received 4.6v not connected to relay when I hooked up the relay it dropped to almost nothing and relay didn't trigger..
OC'S question are they PWM, I can turn them on but no voltage change.. would I need a PWN to voltage board?.
Tested the Close(), doesn't seem to work I may be using it wrong..
I created a global dialog
I also created a button call.
I press the button and it does call the function correct.
I put a ProbeLengthDialog.Close(); in the function but doesn't close it..
I assume the only way I can close a dialog from another function is it has to be global..
There already was a Close statment in auggie before but not sure what it's use was intended for.
Thanks gary
reading Pokeys pins
Re: reading Pokeys pins
Last edited by gburk on Fri Jun 14, 2019 8:22 pm, edited 1 time in total.
Re: reading Pokeys pins
Art
Did a test with the g code, I attached a copy..
It's still running the m6 t when g code first loaded, brings up my dialog and retracts to 1" but the g codel stays at the first line of the code.. first line is hi lighted.
gary
Did a test with the g code, I attached a copy..
It's still running the m6 t when g code first loaded, brings up my dialog and retracts to 1" but the g codel stays at the first line of the code.. first line is hi lighted.
gary
You do not have the required permissions to view the files attached to this post.
Re: reading Pokeys pins
Gary:
Thx, I had lost that file, Ill retest and fix the m6 start.. Ill check the close as well..
>>I think you may be right the pokeys may not be able to handle the voltage output to relays from the LCD pins.. I tested again and received 4.6v not connected to relay when I hooked up the relay it dropped to almost nothing and relay didn't trigger..
Yeah, there's not enough current to push a relay with a pinout, it has only enough for an
LED or signal , running an opto is one way to make it drive a relay.
OC's are open collector outputs, they are like pins with opto's added so that you can draw
enough current for a relay for example. You put 5 volts for example on one side of
a relay, and the other side can be hooked to an OC output. There are 4 OC's, and
you can script call them with Pokeys.SetOC( int oc, int state).
Note: to do this you need to make sure whatever power supply is driving the relay
must share the same ground as the pokeys..
Art
These 4 exist mainly to drive relays..
Be a day or two till I can test the M6.. Ill get back to you soon.
Art
Thx, I had lost that file, Ill retest and fix the m6 start.. Ill check the close as well..
>>I think you may be right the pokeys may not be able to handle the voltage output to relays from the LCD pins.. I tested again and received 4.6v not connected to relay when I hooked up the relay it dropped to almost nothing and relay didn't trigger..
Yeah, there's not enough current to push a relay with a pinout, it has only enough for an
LED or signal , running an opto is one way to make it drive a relay.
OC's are open collector outputs, they are like pins with opto's added so that you can draw
enough current for a relay for example. You put 5 volts for example on one side of
a relay, and the other side can be hooked to an OC output. There are 4 OC's, and
you can script call them with Pokeys.SetOC( int oc, int state).
Note: to do this you need to make sure whatever power supply is driving the relay
must share the same ground as the pokeys..
Art
These 4 exist mainly to drive relays..
Be a day or two till I can test the M6.. Ill get back to you soon.
Art
Re: reading Pokeys pins
Gary:
Small correction. According to the manual the OC's are all
galvanically isolated from the pokeys. So each OC has its own
ground, OC- to be hooked to the ground of the supply driving the
relay from the OC+. The OC command basically if set to state:1
will short those pins OC+ and OC-. Current will flow from OC+ to OC-
when the they are shorted.
You can think of it as a transistor with the OC+ being the collector,
the OC- a grounded emitter, and the state is the base.
So in short this would be an NPN transistor with emitter ( OC-) to
be connected to your power ground and the collector (OC+) to
be connected to one side of the relay. The other side of the coil to
power supply +.
Art
supply grund, and the collector (OC+)
Small correction. According to the manual the OC's are all
galvanically isolated from the pokeys. So each OC has its own
ground, OC- to be hooked to the ground of the supply driving the
relay from the OC+. The OC command basically if set to state:1
will short those pins OC+ and OC-. Current will flow from OC+ to OC-
when the they are shorted.
You can think of it as a transistor with the OC+ being the collector,
the OC- a grounded emitter, and the state is the base.
So in short this would be an NPN transistor with emitter ( OC-) to
be connected to your power ground and the collector (OC+) to
be connected to one side of the relay. The other side of the coil to
power supply +.
Art
supply grund, and the collector (OC+)
Re: reading Pokeys pins
Art
Thanks the oc's work wired up per your directions and relay gos on and off..
Gary
Thanks the oc's work wired up per your directions and relay gos on and off..
Gary
Re: reading Pokeys pins
Gary:
Is it actually opening a dialog on load? I cant find any bad behaviour there, it loads that file and does nothing till I press run and the first dialog opens. What happens there exactly?
..
Your right on the close function, it would have to be a global dialog at that point as a
button code has no way of knowing its parent. Im finding it difficult to find
a way of allowing a close command that will work. Ill keep dwelling on it.
I think I will have to add a sim = GlobalGet("Simulation") as a command so that
a script can be self aware that its being called during a load. It occurs to me there
are time you want to define motion during a load so it shows up in a toolpath,
and other times you may not want to activate during a load.. so the above command
would at least allow that. Im not sure I can do a close..but Ill see what I can think of..
Art
Is it actually opening a dialog on load? I cant find any bad behaviour there, it loads that file and does nothing till I press run and the first dialog opens. What happens there exactly?
..
Your right on the close function, it would have to be a global dialog at that point as a
button code has no way of knowing its parent. Im finding it difficult to find
a way of allowing a close command that will work. Ill keep dwelling on it.
I think I will have to add a sim = GlobalGet("Simulation") as a command so that
a script can be self aware that its being called during a load. It occurs to me there
are time you want to define motion during a load so it shows up in a toolpath,
and other times you may not want to activate during a load.. so the above command
would at least allow that. Im not sure I can do a close..but Ill see what I can think of..
Art
Re: reading Pokeys pins
Gary:
In order to solve the issue of allowing your button script to close a dialog,
the following change has been made. It will be in the next release in a few days.
When adding a button, if you wish it to close the dialog after running your script,
make the call like this..
WaitDialog.AddButton("Touch OFF Z_close","MyToolChange");
Note the buttons name has "_close" appended to the end. This text will
not show up in the actual button , but is a tag telling the system that this
button, after being processed, should then do an implicit OnCancel() to
close the dialog. This will close it just as if the user had pressed the
cancel button with no other effect.
Note: Using _close appended to any control, checkbox, edit window..
anything.. will cause the dialog to close if that function script is called.
Ive tested this with your Gcode file, seems to work fine. I still
dont see any run on load of the tool change though.
Art
In order to solve the issue of allowing your button script to close a dialog,
the following change has been made. It will be in the next release in a few days.
When adding a button, if you wish it to close the dialog after running your script,
make the call like this..
WaitDialog.AddButton("Touch OFF Z_close","MyToolChange");
Note the buttons name has "_close" appended to the end. This text will
not show up in the actual button , but is a tag telling the system that this
button, after being processed, should then do an implicit OnCancel() to
close the dialog. This will close it just as if the user had pressed the
cancel button with no other effect.
Note: Using _close appended to any control, checkbox, edit window..
anything.. will cause the dialog to close if that function script is called.
Ive tested this with your Gcode file, seems to work fine. I still
dont see any run on load of the tool change though.
Art
Re: reading Pokeys pins
Thanks Art
What I am getting when the g code loads is the m6 call seems to run instantly, and the dialog appears and the z axis dro runs to 1"
and that's how I have the m6 script setup it jogs to 1" to do manual tool change..
you are right the code doesn't run, till run is pressed, other that the m6 for some reason, I can hit run now and it will run fine.. jest worries me it does the m6 when g code loaded it could move the axis and mess up things if you don't have the tool in a safe place first ?
I will test it again and let you know the sequence of what exactly is going on..
As for the dialog would it be easier to add getting feed back form the OK - Cancel Buttons they close the dialog and then you could react if cancel do this if ok do that.
Thanks gary
What I am getting when the g code loads is the m6 call seems to run instantly, and the dialog appears and the z axis dro runs to 1"
and that's how I have the m6 script setup it jogs to 1" to do manual tool change..
you are right the code doesn't run, till run is pressed, other that the m6 for some reason, I can hit run now and it will run fine.. jest worries me it does the m6 when g code loaded it could move the axis and mess up things if you don't have the tool in a safe place first ?
I will test it again and let you know the sequence of what exactly is going on..
As for the dialog would it be easier to add getting feed back form the OK - Cancel Buttons they close the dialog and then you could react if cancel do this if ok do that.
Thanks gary
Re: reading Pokeys pins
Art
Ok A clearer picture of what's going on.
I load the g - code it loads fine no call to M6.. good
Now I press RUN it runs to the first M6 call does what its suppose to do, my dialog pops up I close my dialog and now I see the message End of g code run then press RUN the g code seems to rewind and go back to first line.
Now I hit Run again and it stops again at the first M6 my dialog pops up again I exit it, hit Run and now it runs fine, starts running the rest of the g code
Also is there a way to have the g code start running when I close the dialog box so I don't have to keep hitting the RUN button?.
Gary
Ok A clearer picture of what's going on.
I load the g - code it loads fine no call to M6.. good
Now I press RUN it runs to the first M6 call does what its suppose to do, my dialog pops up I close my dialog and now I see the message End of g code run then press RUN the g code seems to rewind and go back to first line.
Now I hit Run again and it stops again at the first M6 my dialog pops up again I exit it, hit Run and now it runs fine, starts running the rest of the g code
Also is there a way to have the g code start running when I close the dialog box so I don't have to keep hitting the RUN button?.
Gary
Last edited by gburk on Sun Jun 16, 2019 6:42 pm, edited 1 time in total.
Re: reading Pokeys pins
Gary:
New version is online of Auggie. The "_close" added to any dialog handler's function name will
tell it to close that dialog when the handler is called. Its like appending a call to OnOK or OnCancel.
I'm not seeing any ill behaviors per say on this version running your file. IT does stop
after each peck drill, but the script calls StopProgram so Id expect that. The only other
stop is after a tool change and that's a safety of sorts. I will see if I can add a continue
script call to help if one wants to continue after an automated tool change.
Art
New version is online of Auggie. The "_close" added to any dialog handler's function name will
tell it to close that dialog when the handler is called. Its like appending a call to OnOK or OnCancel.
I'm not seeing any ill behaviors per say on this version running your file. IT does stop
after each peck drill, but the script calls StopProgram so Id expect that. The only other
stop is after a tool change and that's a safety of sorts. I will see if I can add a continue
script call to help if one wants to continue after an automated tool change.
Art
