From a C program execute:
ch0->OutputGain = -1;
before the axis is enabled.
TK
Group: DynoMotion |
Message: 135 |
From: babinda01 |
Date: 2/16/2010 |
Subject: Re: Mach3 |
Hi Tom
Thanks for the help.
My machine is very close to being finished now, I have just a couple of more things to get working properly. Today I got homing working perfectly - I now press a home axis button and it will rapid traverse at 55 meters per minute onto my home proximity switch, it then back off at 3 m/min until the prox goes low and then it homes onto the Z pulse of the encoder at 100mm/min. Even at my highest rapid rate - approx 75meters per minute - it still homes perfectly to with .002 - .005mm every time.
My next problem is that when mach3 starts, I SetBit(152) as part of my enable circuit, this works well but when mach shuts down I need to be able to disable my enable circuit, Is there some way I can disable this bit on shutdown of mach3?? Also when I press my reset button in mach (putting the mach into e/stop) I need to disable this bit - could you please give me an example for this as well.
Thanks again for your patients with my dumb questions.
Regards
Andrew
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> From a C program execute:
>
> ch0->OutputGain = -1;
>
> before the axis is enabled.
>
> TK
>
>
>
>
> ________________________________
> From: babinda01 <a_k@...>
> To: DynoMotion@yahoogroups.com
> Sent: Mon, February 15, 2010 9:37:56 PM
> Subject: [DynoMotion] Mach3
>
> Â
> Hi Tom
> I need to change the direction of an axis. Normally within mach you can change the direction bit from active high to low, how is this done with the kflop and mach3 plugin.
>
> Thanks
> Andrew
>
|
|
Group: DynoMotion |
Message: 136 |
From: Tom Kerekes |
Date: 2/18/2010 |
Subject: Re: Mach3 |
Hi Andrew,
Wow - crazy fast!
Regarding the enable circuit: you might try using a defined motor enable bit in the Mach3 ports and pins configuration. Mach3 should enable that bit after RESET and disable that bit on Estop. I don't know of a way to cause Mach3 to do something on program exit. The only thing I can think of would be to toggle a bit with a Mach3 "Brain" or something and run a watchdog type of program in KFLOP. The watchdog time would have to be quite long (seconds) to tolerate when Windows/Mach3 freezes on rare occasions (which is one of the main reasons for using KFLOP).
Regards
TK
Group: DynoMotion |
Message: 140 |
From: babinda01 |
Date: 2/19/2010 |
Subject: Re: Mach3 |
Hi Tom
I will try using the enable axis pins and see what I can achieve.
Can the Kflop handle the charge pump signal at all? I know it is a digital signal from Mach at I think about 12Khz, can this be used somehow with the Kflop???
Regards
Andrew
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Andrew,
>
> Wow - crazy fast!
>
> Regarding the enable circuit: you might try using a defined motor enable bit in the Mach3 ports and pins configuration. Mach3 should enable that bit after RESET and disable that bit on Estop. I don't know of a way to cause Mach3 to do something on program exit. The only thing I can think of would be to toggle a bit with a Mach3 "Brain" or something and run a watchdog type of program in KFLOP. The watchdog time would have to be quite long (seconds) to tolerate when Windows/Mach3 freezes on rare occasions (which is one of the main reasons for using KFLOP).
>
> Regards
> TK
>
>
>
>
> ________________________________
> From: babinda01 <a_k@...>
> To: DynoMotion@yahoogroups.com
> Sent: Tue, February 16, 2010 11:31:26 PM
> Subject: [DynoMotion] Re: Mach3
>
> Â
> Hi Tom
> Thanks for the help.
> My machine is very close to being finished now, I have just a couple of more things to get working properly. Today I got homing working perfectly - I now press a home axis button and it will rapid traverse at 55 meters per minute onto my home proximity switch, it then back off at 3 m/min until the prox goes low and then it homes onto the Z pulse of the encoder at 100mm/min. Even at my highest rapid rate - approx 75meters per minute - it still homes perfectly to with .002 - .005mm every time.
> My next problem is that when mach3 starts, I SetBit(152) as part of my enable circuit, this works well but when mach shuts down I need to be able to disable my enable circuit, Is there some way I can disable this bit on shutdown of mach3?? Also when I press my reset button in mach (putting the mach into e/stop) I need to disable this bit - could you please give me an example for this as well.
>
> Thanks again for your patients with my dumb questions.
>
> Regards
> Andrew
>
> --- In DynoMotion@yahoogro ups.com, Tom Kerekes <tk@> wrote:
> >
> > From a C program execute:
> >
> > ch0->OutputGain = -1;
> >
> > before the axis is enabled.
> >
> > TK
> >
> >
> >
> >
> > ____________ _________ _________ __
> > From: babinda01 <a_k@>
> > To: DynoMotion@yahoogro ups.com
> > Sent: Mon, February 15, 2010 9:37:56 PM
> > Subject: [DynoMotion] Mach3
> >
> > ÃÂ
> > Hi Tom
> > I need to change the direction of an axis. Normally within mach you can change the direction bit from active high to low, how is this done with the kflop and mach3 plugin.
> >
> > Thanks
> > Andrew
> >
>
|
|
Group: DynoMotion |
Message: 141 |
From: Tom Kerekes |
Date: 2/20/2010 |
Subject: Re: Mach3 |
Hi Andrew,
Well no. But this is an excellent question and we are open for ideas. The charge pump is generated by the Mach3 Parallel Port Kernel driver which is not installed or used with the KFLOP Plugin. One of the main reasons for using a KFLOP Controller (or any external motion generator) is to relieve the PC and Windows from being required to be deterimistically real-time. It might make sense for us to add a "charge pump" type of signal in our plugin but it would need to be much slower. Also since on rare occasions Windows causes Mach3 (and our plugin) to freeze up for several seconds, whatever is watching the signal would need to expect that to occasionally occur.
There is probably a way to add a background program in Mach3 using a "brain" or something to constantly toggle a bit and so generate an "I'm alive" signal that could be monitored by either hardware or a KFLOP program.
I'm not sure understand the requirement. If the system is "safe" with Mach3 up and running, how does it become "unsafe" if Mach3 is closed or unresponsive.
But I can see how it would be prudent to disable the system if Mach3 isn't running. Maybe Mach3 sends a message to Plugins on normal program exit that might be useful?
Thanks
TK
Group: DynoMotion |
Message: 143 |
From: babinda01 |
Date: 2/20/2010 |
Subject: Re: Mach3 |
Hi Tom
At the present moment some sort of message on shut down of mach would work for me, because with my current project, if I shut mach3 down all my drives and spindle controllers stay enabled. I havn't tried having a spindle running and then shut mach down, so I am not sure what would happen in that situation.
But I do believe in the longer term, some sort of watchdog system would be absolutly essential. Windows is a terrible system for CNC so I feel that we need to make sure a system is absolutly safe no matter what windows tries to do.
Regards
Andrew
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Andrew,
>
> Well no. But this is an excellent question and we are open for ideas. The charge pump is generated by the Mach3 Parallel Port Kernel driver which is not installed or used with the KFLOP Plugin. One of the main reasons for using a KFLOP Controller (or any external motion generator) is to relieve the PC and Windows from being required to be deterimistically real-time. It might make sense for us to add a "charge pump" type of signal in our plugin but it would need to be much slower.  Also since on rare occasions Windows causes Mach3 (and our plugin) to freeze up for several seconds, whatever is watching the signal would need to expect that to occasionally occur.Â
>
> There is probably a way to add a background program in Mach3 using a "brain" or something to constantly toggle a bit and so generate an "I'm alive"Â signal that could be monitored by either hardware or a KFLOP program.
>
> I'm not sure understand the requirement. If the system is "safe" with Mach3 up and running, how does it become "unsafe" if Mach3 is closed or unresponsive.
>
> But I can see how it would be prudent to disable the system if Mach3 isn't running. Maybe Mach3 sends a message to Plugins on normal program exit that might be useful?
>
> Thanks
> TK
>
>
>
|
|
Group: DynoMotion |
Message: 144 |
From: Tom Kerekes |
Date: 2/21/2010 |
Subject: Re: Mach3 |
Andrew,
We added a counter (StatusRequestCounter) to the status read in the firmware, so it is easy to check if the status is being actively read by some application (ie. Mach3, or KMotionCNC, or KMotion.exe).
Here is a patch if you would like to try it. There are 3 files: Copy the new firmware (DSPKFlop.out) and new header (KMotionDef.h) to your DSP_KFlop directoy, then flash the new firmware. It will report the version as V4.19c. Then run the WatchStatus.c User program. Modify it as required for your system. By default it will enable KFlop LED IO46 when Mach3 is running. 3 Seconds after Mach3 terminates (and stops reading KFlop status) the LED should go out. There is also an option to re-enable the bit automatically when status reads resume, but it might be better to have the RESET command do this. I also pasted the WatchStatus program below. You will probably want to merge this code at the end of your master init program.
Let me know what you think.
TK
#include "KMotionDef.h" #define OUTPUT_BIT 46 // bit to activate #define ACTIVE_STATE 1 // Set bit to this when status is actively read #define TIMEOUT 3.0 // seconds - deactivate output if no status for this time #define ACTIVATE_ALSO 0 // Set to 0 to never re-enable (only disable) int LastCount; double LastTime; void ServiceWatchStatus(void); main() { LastCount=StatusRequestCounter; LastTime = Time_sec(); while(1) // loop forever { ServiceWatchStatus(); WaitNextTimeSlice(); } } void ServiceWatchStatus(void) { int NewCount = StatusRequestCounter; double NewTime = Time_sec(); if (NewCount != LastCount) { // status was read, activate the bit if (ACTIVATE_ALSO) SetStateBit(OUTPUT_BIT,ACTIVE_STATE); LastCount = NewCount; LastTime = NewTime; } else if (NewTime > LastTime+TIMEOUT) { // we timed out deactivate the bit SetStateBit(OUTPUT_BIT,1-ACTIVE_STATE); LastTime
= NewTime; } }
Group: DynoMotion |
Message: 150 |
From: babinda01 |
Date: 2/24/2010 |
Subject: Re: Mach3 |
Hi Tom
I have been testing my machine today, and have found a couple of issues.
My machine has to rapid up to the job, and start the left hand spindle (M03)and while the spindle is running up to full speed, the machine goes through an engraving cycle which engraves a part number onto the side of the job. This engraving is done by activating a solenoid with the M08 command and deactivating with a M09. This solenoid gets activated quite regularly at the start and end of each letter or possibly several times during a letter, depending on the particular letter and font chosen. What is happening is that there is a noticable pause before and after each M08 and M09 and also the spindle is stopping and starting at each toggle of the engraver. It is like all the outputs are being toggled on and off at each "M" command, is this so? and if so can it be changed somehow, or is there a different way of configuring my system to do this.
Regards
Andrew
|
|
Group: DynoMotion |
Message: 151 |
From: Tom Kerekes |
Date: 2/24/2010 |
Subject: Re: Mach3 |
Hi Andrew,
Hmmm. No the outputs should not toggle on M commands. I have no idea whay that might occur. I'm not sure if Mach3 does something special for M08/M09 coolant commands. I see those are handled somehow internally by Mach3 as there is no Macro VB Script for those.
Let's try using a custom M command to see if that works better. Try defining M100 and M101 as empty VB Script to see if the spindle is still affected. If that works we can add VB script to do a NotifyPlugins(xx) to send a message to KFLOP to toggle your engraver.
Unfortuneately I don't know of a way to embed I/O commands in the Mach3 motion stream like we have in KMotionCNC with the SetBitBuf/ClearBitBuf commands so they happen in real time. A workaround might be to setup a dummy axis that we move up and down a tiny bit and we program KFLOP to watch for this motion and switch the engraver.
Regards
TK
Group: DynoMotion |
Message: 154 |
From: babinda01 |
Date: 2/24/2010 |
Subject: Re: Mach3 |
Hi Tom
I did as suggested with using M108, M107 and M109 for the engraver, instead of M7, M8 and M9. It works perfectly - Thanks.
In regard to my spindle turning on and off, that one was my fault, I had a little bug in my M03 script - Sorry.
Another little issue I noticed, is that if I hid the stop button or press the reset button while in the middle of the homing routine, mach just carries on homing. Is there a way to halt the homing script if a reset/estop happens?
Thanks again for your help.
Andrew
|
|
Group: DynoMotion |
Message: 157 |
From: babinda01 |
Date: 2/24/2010 |
Subject: Re: Mach3 |
Hi Tom
I'm almost finished!!! so you can heave a sigh of relief SOON.
Is there a way of getting mach to execute an instruction from within a C program for the kflop?
I have my homing script, which homes to a limit and then to the next index pulse, but after the machine has finished homing the last axis (A), I want mach to execute a G57 command followed by a G00 X?? Z?? and A?? command. In this way the machine homes and then straight away move to a Job Loading Position. I can put these movements/commands into a macro (M100) but I still need to be able to make the M100 call after the homing sequence has finished. If I can't send an instruction from the C program to mach is there another way of achieving this?
Regards
Andrew
|
|
Group: DynoMotion |
Message: 158 |
From: Tom Kerekes |
Date: 2/25/2010 |
Subject: Re: Mach3 |
Andrew,
BTW I ran a test and it appears that Mach3 turns off the Motor enables just before a normal exit.
TK
Group: DynoMotion |
Message: 159 |
From: babinda01 |
Date: 2/25/2010 |
Subject: Re: Mach3 |
Hi Tom
I'm almost finished!!! so you can heave a sigh of relief SOON.
Is there a way of getting mach to execute an instruction from within a C program for the kflop?
I have my homing script, which homes to a limit and then to the next index pulse, but after the machine has finished homing the last axis (A), I want mach to execute a G57 command followed by a G00 X?? Z?? and A?? command. In this way the machine homes and then straight away move to a Job Loading Position. I can put these movements/commands into a macro (M100) but I still need to be able to make the M100 call after the homing sequence has finished. If I can't send an instruction from the C program to mach is there another way of achieving this?
Regards
Andrew
|
|
Group: DynoMotion |
Message: 160 |
From: babinda01 |
Date: 2/25/2010 |
Subject: Re: Mach3 |
Hi Tom
Yes, I actually discovered this for myself earlier today.
Thanks
Andrew
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Andrew,
>
> BTW I ran a test and it appears that Mach3 turns off the Motor enables just before a normal exit.
>
> TK
>
>
>
>
> ________________________________
> From: babinda01 <a_k@...>
> To: DynoMotion@yahoogroups.com
> Sent: Sat, February 20, 2010 2:07:24 PM
> Subject: [DynoMotion] Re: Mach3
>
> Â
> Hi Tom
> At the present moment some sort of message on shut down of mach would work for me, because with my current project, if I shut mach3 down all my drives and spindle controllers stay enabled. I havn't tried having a spindle running and then shut mach down, so I am not sure what would happen in that situation.
> But I do believe in the longer term, some sort of watchdog system would be absolutly essential. Windows is a terrible system for CNC so I feel that we need to make sure a system is absolutly safe no matter what windows tries to do.
>
> Regards
> Andrew
>
> --- In DynoMotion@yahoogro ups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Andrew,
> >
> > Well no.ÃÂ But this is an excellent question and we are open for ideas.ÃÂ The charge pump is generated by the Mach3 Parallel Port Kernel driver which is not installed or used with the KFLOP Plugin.ÃÂ One of the main reasons for using a KFLOP Controller (or any external motion generator) is to relieve the PC and Windows from being required to be deterimistically real-time.ÃÂ It might make sense for us to add a "charge pump" type of signal in our plugin but it would need to be much slower.ÃÂ ÃÂ Also since on rare occasions Windows causes Mach3 (and our plugin) to freeze up for several seconds, whatever is watching the signal would need to expect that to occasionally occur.ÃÂ
> >
> > There is probably a way to add a background program in Mach3 using a "brain" or something to constantly toggle a bit and so generate an "I'm alive"ÃÂ signal that could be monitored by either hardware or a KFLOP program.
> >
> > I'm not sure understand the requirement.ÃÂ If the system is "safe" with Mach3 up and running, how does it become "unsafe" if Mach3 is closed or unresponsive.
> >
> > But I can see how it would be prudent to disable the system if Mach3 isn't running.ÃÂ Maybe Mach3 sends a message to Plugins on normal program exit that might be useful?
> >
> > Thanks
> > TK
> >
> >
> >
>
|
|
Group: DynoMotion |
Message: 161 |
From: Tom Kerekes |
Date: 2/25/2010 |
Subject: Re: Mach3 |
Hey Andrew,
No there currently isn't really a way to make calls from KFlop to Mach3.
But why can't you just add those operations to the end of your homing VB script? Are you using the REF ALL button to do this?
You may need to devise a way for the VB script to wait until the homing is finished before issuing the commands. Possibly set a Virtual IO bit as a flag.
TK
Group: DynoMotion |
Message: 162 |
From: babinda01 |
Date: 2/25/2010 |
Subject: Re: Mach3 |
Hi Tom
Thanks for the info.
I did have this in my VB script, but it was getting executed while the machine was still in the homing process.
I will try as you suggested and see if I can use a signal from the kflop to trigger a homing completed signal so that I can do my other motion after recieving this completed signal.
Andrew
|
|
Group: DynoMotion |
Message: 170 |
From: babinda01 |
Date: 2/27/2010 |
Subject: Re: Mach3 |
Hi Tom
I am having a little trouble still with getting a "homing completed" signal coming back to mach3.
In my homing C program I have added a SetStateBit(160,1) at the start of my homing routine and then a SetStateBit(160,0) at the end. This works ok, I can see the bits change on the IO screen of KMotion, but for the life of mee I cant get these signals back to Mach3 Input #2 which I have set as port 2 pin 32.
I was trying 160 because all my opto inputs are used for other things bits 128-135 appear to be used so 160-167 are all I have free.
Any thought on what I could try - is there another bit I should be trying?
Regards
Andrew
|
|
Group: DynoMotion |
Message: 171 |
From: Tom Kerekes |
Date: 2/27/2010 |
Subject: Re: Mach3 |
Andrew,
You need to use the patched plugin to access IO's > 128. Are you using this?
Otherwise you might use IO46 or 47 which are the KFLOP LEDs.
Or 48 - 63 are hidden Virtual Bits originally designed to be used as flags.
How do you know it isn't working? What is the symptom? I was thinking there might be a race condition where your routine starts checking for the bit to go low before it actually gets set high?
TK
Group: DynoMotion |
Message: 172 |
From: babinda01 |
Date: 2/27/2010 |
Subject: Re: Mach3 |
Hi Tom
Yes, I am using the patched version. My estop, and a couple of other inputs are working fine and they are connected to the opto inputs of the kanalog.
For testing all I have been doing is looking to see if the input2 led will come on, on the diagnosics page of Mach3 - but no go. As I said, I can see the bits change in the kmaotion software , but I cant see it working on the mach3 leds.
I will try a couple of these other bits you mentioned. I was thinking that the plugin only recognised certain bits as inputs and certain ones as outputs.
Andrew
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Andrew,
>
> You need to use the patched plugin to access IO's > 128. Are you using this?
>
> Otherwise you might use IO46 or 47 which are the KFLOP LEDs.
>
> Or 48 - 63 are hidden Virtual Bits originally designed to be used as flags.
>
> How do you know it isn't working? What is the symptom? I was thinking there might be a race condition where your routine starts checking for the bit to go low before it actually gets set high?
>
> TK
>
>
> Â
>
>
>
> ________________________________
> From: babinda01 <a_k@...>
> To: DynoMotion@yahoogroups.com
> Sent: Sat, February 27, 2010 5:47:28 PM
> Subject: [DynoMotion] Re: Mach3
>
> Â
>
> Hi Tom
> I am having a little trouble still with getting a "homing completed" signal coming back to mach3.
> In my homing C program I have added a SetStateBit( 160,1) at the start of my homing routine and then a SetStateBit( 160,0) at the end. This works ok, I can see the bits change on the IO screen of KMotion, but for the life of mee I cant get these signals back to Mach3 Input #2 which I have set as port 2 pin 32.
> I was trying 160 because all my opto inputs are used for other things bits 128-135 appear to be used so 160-167 are all I have free.
> Any thought on what I could try - is there another bit I should be trying?
>
> Regards
> Andrew
>
|
|
Group: DynoMotion |
Message: 174 |
From: babinda01 |
Date: 2/27/2010 |
Subject: Re: Mach3 |
Hi Tom
I am getting closer.
I now have my homing complete signal working ok - using Bit 48 instead of 160 worked.
Now for my next problem - it may be a bug in the plug-in (or else I am just stupid)
If I have my Homing script in Mach3 like this:
Message ""
Code "G90 G54"
DoButton(24)
DoButton(22)
DoButton(25)
Message "Homing All Axis"
While IsActive(input2) ### Input2 is activated by bit 48 to
say homing is completed
Sleep(1000)
Wend
Everything works perfectly...
Then I changed it to:
Message ""
Code "G90 G54"
DoButton(24)
DoButton(22)
DoButton(25)
Message "Homing All Axis"
While IsActive(input2)
Sleep(1000)
Wend
Code "M899"
With My M899 as:
Code "G00 A120"
Message "Homing Completed"
This homes as it did before and then just the DRO's in Mach change to A120 (the axis don't actually move).
I then tried deleting the code "M899" from my homing script, and then ran the script and then manually in MDI mode entered the M899, again it stayed in position and just the dro's move to A120. So then I ran the home script, manually jogged the A axis (just a bit) and then ran the M899 and everything worked as it should have.
Any thoughts
Andrew
--- In DynoMotion@yahoogroups.com, "babinda01" <a_k@...> wrote:
>
> Hi Tom
> Yes, I am using the patched version. My estop, and a couple of other inputs are working fine and they are connected to the opto inputs of the kanalog.
> For testing all I have been doing is looking to see if the input2 led will come on, on the diagnosics page of Mach3 - but no go. As I said, I can see the bits change in the kmaotion software , but I cant see it working on the mach3 leds.
> I will try a couple of these other bits you mentioned. I was thinking that the plugin only recognised certain bits as inputs and certain ones as outputs.
>
> Andrew
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Andrew,
> >
> > You need to use the patched plugin to access IO's > 128. Are you using this?
> >
> > Otherwise you might use IO46 or 47 which are the KFLOP LEDs.
> >
> > Or 48 - 63 are hidden Virtual Bits originally designed to be used as flags.
> >
> > How do you know it isn't working? What is the symptom? I was thinking there might be a race condition where your routine starts checking for the bit to go low before it actually gets set high?
> >
> > TK
> >
> >
> > Â
> >
> >
> >
> > ________________________________
> > From: babinda01 <a_k@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Sat, February 27, 2010 5:47:28 PM
> > Subject: [DynoMotion] Re: Mach3
> >
> > Â
> >
> > Hi Tom
> > I am having a little trouble still with getting a "homing completed" signal coming back to mach3.
> > In my homing C program I have added a SetStateBit( 160,1) at the start of my homing routine and then a SetStateBit( 160,0) at the end. This works ok, I can see the bits change on the IO screen of KMotion, but for the life of mee I cant get these signals back to Mach3 Input #2 which I have set as port 2 pin 32.
> > I was trying 160 because all my opto inputs are used for other things bits 128-135 appear to be used so 160-167 are all I have free.
> > Any thought on what I could try - is there another bit I should be trying?
> >
> > Regards
> > Andrew
> >
>
|
|
Group: DynoMotion |
Message: 175 |
From: Tom Kerekes |
Date: 2/27/2010 |
Subject: Re: Mach3 |
Hey Andrew,
That is too strange...
Where is A at before you start the Homing process? I'm guessing that Mach somehow still thinks A is at 120 even though we homed. So then if we say go to 120 it doesn't move. Any jogging causes Mach3 to re-sync it's internal position.
So to test that theory move to 180 before hand. Then after homing if Mach still thinks we are at 180, then a move to 120 would cause a motion of -60.
What happens if you do something similar with the X axis instead of A??
When the DRO changes to 120 does it change gradually like there was a motion?
What is the DRO before the G00 A120 ??
What does the KMotion Axis Screen say the raw steps are before and after?
Sorry for all the questions and no answers :}
TK
Group: DynoMotion |
Message: 176 |
From: babinda01 |
Date: 2/27/2010 |
Subject: Re: Mach3 |
Hi Tom
Thanks for the reply
I have knocked off for the day - I try to work only half a day on Sundays (12 hrs).
I will do some more tests tomorrow, and will let you know the answers then.
I know for sure that Machs DRo's for both commanded and machine are at 0.00 after homing and before the A120 Command.
Regards
Andrew
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hey Andrew,
>
> That is too strange...
>
> Where is A at before you start the Homing process? I'm guessing that Mach somehow still thinks A is at 120 even though we homed. So then if we say go to 120 it doesn't move. Any jogging causes Mach3 to re-sync it's internal position.
>
> So to test that theory move to 180 before hand. Then after homing if Mach still thinks we are at 180, then a move to 120 would cause a motion of -60.
>
> What happens if you do something similar with the X axis instead of A??
>
> When the DRO changes to 120 does it change gradually like there was a motion?
>
> What is the DROÂ before the G00 A120 ??
>
> What does the KMotion Axis Screen say the raw steps are before and after?
>
>
> Sorry for all the questions and no answers :}
>
> TK
>
>
>
>
> ________________________________
> From: babinda01 <a_k@...>
> To: DynoMotion@yahoogroups.com
> Sent: Sat, February 27, 2010 8:30:13 PM
> Subject: [DynoMotion] Re: Mach3
>
> Â
>
>
> Hi Tom
> I am getting closer.
> I now have my homing complete signal working ok - using Bit 48 instead of 160 worked.
> Now for my next problem - it may be a bug in the plug-in (or else I am just stupid)
> If I have my Homing script in Mach3 like this:
>
> Message ""
> Code "G90 G54"
> DoButton(24)
> DoButton(22)
> DoButton(25)
> Message "Homing All Axis"
> While IsActive(input2) ### Input2 is activated by bit 48 to
> say homing is completed
> Sleep(1000)
> Wend
>
> Everything works perfectly...
>
> Then I changed it to:
> Message ""
> Code "G90 G54"
> DoButton(24)
> DoButton(22)
> DoButton(25)
> Message "Homing All Axis"
> While IsActive(input2)
> Sleep(1000)
> Wend
> Code "M899"
>
> With My M899 as:
>
> Code "G00 A120"
> Message "Homing Completed"
>
> This homes as it did before and then just the DRO's in Mach change to A120 (the axis don't actually move).
> I then tried deleting the code "M899" from my homing script, and then ran the script and then manually in MDI mode entered the M899, again it stayed in position and just the dro's move to A120. So then I ran the home script, manually jogged the A axis (just a bit) and then ran the M899 and everything worked as it should have.
>
> Any thoughts
>
> Andrew
>
> --- In DynoMotion@yahoogro ups.com, "babinda01" <a_k@> wrote:
> >
> > Hi Tom
> > Yes, I am using the patched version. My estop, and a couple of other inputs are working fine and they are connected to the opto inputs of the kanalog.
> > For testing all I have been doing is looking to see if the input2 led will come on, on the diagnosics page of Mach3 - but no go. As I said, I can see the bits change in the kmaotion software , but I cant see it working on the mach3 leds.
> > I will try a couple of these other bits you mentioned. I was thinking that the plugin only recognised certain bits as inputs and certain ones as outputs.
> >
> > Andrew
> >
> > --- In DynoMotion@yahoogro ups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Andrew,
> > >
> > > You need to use the patched plugin to access IO's > 128.ÃÂ Are you using this?
> > >
> > > Otherwise you might use IO46 or 47 which are the KFLOP LEDs.
> > >
> > > Or 48 - 63 are hidden Virtual Bits originally designed to be used as flags.
> > >
> > > How do you know it isn't working?ÃÂ What is the symptom?ÃÂ I was thinking there might be a race condition where your routine starts checking for the bit to go low before it actually gets set high?
> > >
> > > TK
> > >
> > >
> > > ÃÂ
> > >
> > >
> > >
> > > ____________ _________ _________ __
> > > From: babinda01 <a_k@>
> > > To: DynoMotion@yahoogro ups.com
> > > Sent: Sat, February 27, 2010 5:47:28 PM
> > > Subject: [DynoMotion] Re: Mach3
> > >
> > > ÃÂ
> > >
> > > Hi Tom
> > > I am having a little trouble still with getting a "homing completed" signal coming back to mach3.
> > > In my homing C program I have added a SetStateBit( 160,1) at the start of my homing routine and then a SetStateBit( 160,0) at the end. This works ok, I can see the bits change on the IO screen of KMotion, but for the life of mee I cant get these signals back to Mach3 Input #2 which I have set as port 2 pin 32.
> > > I was trying 160 because all my opto inputs are used for other things bits 128-135 appear to be used so 160-167 are all I have free.
> > > Any thought on what I could try - is there another bit I should be trying?
> > >
> > > Regards
> > > Andrew
> > >
> >
>
|
|
Group: DynoMotion |
Message: 179 |
From: babinda01 |
Date: 3/2/2010 |
Subject: Re: Mach3 |
Hi Tom
I have done a bit of testing in regard to my homing problems, and I think your first point below is correct.
On my very first home command after mach3 has been started, the machine homes correctly and moves to the A120 position ok.. But any other homes after that it just ignores the A120 movement command and just changes the DRO to read 120.000.
And your point 2 is correct also, if I jog the machine to A180 and then run my homing script the machine actually goes to A60.
If I change my homing script from A120 to X12. this works every time, so it is something to do with the rotary axis.
I hope this helps, if you need me to try other tests please let me know.
Regards
Andrew
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hey Andrew,
>
> That is too strange...
>
> Where is A at before you start the Homing process? I'm guessing that Mach somehow still thinks A is at 120 even though we homed. So then if we say go to 120 it doesn't move. Any jogging causes Mach3 to re-sync it's internal position.
>
> So to test that theory move to 180 before hand. Then after homing if Mach still thinks we are at 180, then a move to 120 would cause a motion of -60.
>
> What happens if you do something similar with the X axis instead of A??
>
> When the DRO changes to 120 does it change gradually like there was a motion?
>
> What is the DROÂ before the G00 A120 ??
>
> What does the KMotion Axis Screen say the raw steps are before and after?
>
>
> Sorry for all the questions and no answers :}
>
> TK
>
>
>
>
> ________________________________
> From: babinda01 <a_k@...>
> To: DynoMotion@yahoogroups.com
> Sent: Sat, February 27, 2010 8:30:13 PM
> Subject: [DynoMotion] Re: Mach3
>
> Â
>
>
> Hi Tom
> I am getting closer.
> I now have my homing complete signal working ok - using Bit 48 instead of 160 worked.
> Now for my next problem - it may be a bug in the plug-in (or else I am just stupid)
> If I have my Homing script in Mach3 like this:
>
> Message ""
> Code "G90 G54"
> DoButton(24)
> DoButton(22)
> DoButton(25)
> Message "Homing All Axis"
> While IsActive(input2) ### Input2 is activated by bit 48 to
> say homing is completed
> Sleep(1000)
> Wend
>
> Everything works perfectly...
>
> Then I changed it to:
> Message ""
> Code "G90 G54"
> DoButton(24)
> DoButton(22)
> DoButton(25)
> Message "Homing All Axis"
> While IsActive(input2)
> Sleep(1000)
> Wend
> Code "M899"
>
> With My M899 as:
>
> Code "G00 A120"
> Message "Homing Completed"
>
> This homes as it did before and then just the DRO's in Mach change to A120 (the axis don't actually move).
> I then tried deleting the code "M899" from my homing script, and then ran the script and then manually in MDI mode entered the M899, again it stayed in position and just the dro's move to A120. So then I ran the home script, manually jogged the A axis (just a bit) and then ran the M899 and everything worked as it should have.
>
> Any thoughts
>
> Andrew
>
> --- In DynoMotion@yahoogro ups.com, "babinda01" <a_k@> wrote:
> >
> > Hi Tom
> > Yes, I am using the patched version. My estop, and a couple of other inputs are working fine and they are connected to the opto inputs of the kanalog.
> > For testing all I have been doing is looking to see if the input2 led will come on, on the diagnosics page of Mach3 - but no go. As I said, I can see the bits change in the kmaotion software , but I cant see it working on the mach3 leds.
> > I will try a couple of these other bits you mentioned. I was thinking that the plugin only recognised certain bits as inputs and certain ones as outputs.
> >
> > Andrew
> >
> > --- In DynoMotion@yahoogro ups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Andrew,
> > >
> > > You need to use the patched plugin to access IO's > 128.ÃÂ Are you using this?
> > >
> > > Otherwise you might use IO46 or 47 which are the KFLOP LEDs.
> > >
> > > Or 48 - 63 are hidden Virtual Bits originally designed to be used as flags.
> > >
> > > How do you know it isn't working?ÃÂ What is the symptom?ÃÂ I was thinking there might be a race condition where your routine starts checking for the bit to go low before it actually gets set high?
> > >
> > > TK
> > >
> > >
> > > ÃÂ
> > >
> > >
> > >
> > > ____________ _________ _________ __
> > > From: babinda01 <a_k@>
> > > To: DynoMotion@yahoogro ups.com
> > > Sent: Sat, February 27, 2010 5:47:28 PM
> > > Subject: [DynoMotion] Re: Mach3
> > >
> > > ÃÂ
> > >
> > > Hi Tom
> > > I am having a little trouble still with getting a "homing completed" signal coming back to mach3.
> > > In my homing C program I have added a SetStateBit( 160,1) at the start of my homing routine and then a SetStateBit( 160,0) at the end. This works ok, I can see the bits change on the IO screen of KMotion, but for the life of mee I cant get these signals back to Mach3 Input #2 which I have set as port 2 pin 32.
> > > I was trying 160 because all my opto inputs are used for other things bits 128-135 appear to be used so 160-167 are all I have free.
> > > Any thought on what I could try - is there another bit I should be trying?
> > >
> > > Regards
> > > Andrew
> > >
> >
>
|
|
Group: DynoMotion |
Message: 181 |
From: Tom Kerekes |
Date: 3/3/2010 |
Subject: Re: Mach3 |
Hi Andrew,
I looked through our Plugin code and I can't find a bug with regard to the A axis.
You do have the A axis defined in the KFLOP Coordinate Systems don't you? If you type DefineCS on the console what is displayed?
What if we try adding a dummy NotifyPlugins(10000) before the Sleep(1000) in your VB Script? If you don't already have a Notify KFLOP program create one that just prints the notification code or something (and use a code that you are not already using). After the KFlop Notification program finishes it should tell Mach3 to re-sync to the hardware state. See if it fixes the problem.
Thanks
TK
Group: DynoMotion |
Message: 183 |
From: babinda01 |
Date: 3/3/2010 |
Subject: Re: Mach3 |
Hi Tom
I think I have the axis defined correctly. In my Init program I have DefineCoordSystem(5,-1,4,6)
If I do a defineCS I get 5 -1 4 6
I tried adding the NotifyPlugins(10000) but I am not sure what I should have in my NotifyMach.C program, I just have the default one, but this did'nt help at all either. Should I change my NotifyMach.c to something else???
Regards
Andrew
--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Andrew,
>
> I looked through our Plugin code and I can't find a bug with regard to the A axis.
>
> You do have the A axis defined in the KFLOP Coordinate Systems don't you? If you type DefineCS on the console what is displayed?
>
> What if we try adding a dummy NotifyPlugins(10000) before the Sleep(1000) in your VB Script? If you don't already have a Notify KFLOP program create one that just prints the notification code or something (and use a code that you are not already using). After the KFlop Notification program finishes it should tell Mach3 to re-sync to the hardware state. See if it fixes the problem.
>
> Thanks
> TK
>
>
>
> ________________________________
> From: babinda01 <a_k@...>
> To: DynoMotion@yahoogroups.com
> Sent: Tue, March 2, 2010 4:47:31 PM
> Subject: [DynoMotion] Re: Mach3
>
> Â
> Hi Tom
> I have done a bit of testing in regard to my homing problems, and I think your first point below is correct.
> On my very first home command after mach3 has been started, the machine homes correctly and moves to the A120 position ok.. But any other homes after that it just ignores the A120 movement command and just changes the DRO to read 120.000.
>
> And your point 2 is correct also, if I jog the machine to A180 and then run my homing script the machine actually goes to A60.
>
> If I change my homing script from A120 to X12. this works every time, so it is something to do with the rotary axis.
>
> I hope this helps, if you need me to try other tests please let me know.
>
> Regards
> Andrew
>
> --- In DynoMotion@yahoogro ups.com, Tom Kerekes <tk@> wrote:
> >
> > Hey Andrew,
> >
> > That is too strange...
> >
> > Where is A at before you start theÃÂ Homing process?ÃÂ I'm guessing that Mach somehow still thinks A is at 120 even though we homed.ÃÂ So then if we say go to 120 it doesn't move.ÃÂ Any jogging causes Mach3 to re-sync it's internal position.
> >
> > So to test that theory move to 180 before hand.ÃÂ Then after homing if Mach still thinks we are at 180, then a move to 120 would cause a motion of -60.
> >
> > What happens if you do something similar with the X axis instead of A??
> >
> > When the DRO changes to 120 does it change gradually like there was a motion?
> >
> > What is the DROÃÂ before the G00 A120 ??
> >
> > What does the KMotion Axis Screen say the raw steps are before and after?
> >
> >
> > Sorry for all the questions and no answers :}
> >
> > TK
> >
> >
> >
> >
> > ____________ _________ _________ __
> > From: babinda01 <a_k@>
> > To: DynoMotion@yahoogro ups.com
> > Sent: Sat, February 27, 2010 8:30:13 PM
> > Subject: [DynoMotion] Re: Mach3
> >
> > ÃÂ
> >
> >
> > Hi Tom
> > I am getting closer.
> > I now have my homing complete signal working ok - using Bit 48 instead of 160 worked.
> > Now for my next problem - it may be a bug in the plug-in (or else I am just stupid)
> > If I have my Homing script in Mach3 like this:
> >
> > Message ""
> > Code "G90 G54"
> > DoButton(24)
> > DoButton(22)
> > DoButton(25)
> > Message "Homing All Axis"
> > While IsActive(input2) ### Input2 is activated by bit 48 to
> > say homing is completed
> > Sleep(1000)
> > Wend
> >
> > Everything works perfectly...
> >
> > Then I changed it to:
> > Message ""
> > Code "G90 G54"
> > DoButton(24)
> > DoButton(22)
> > DoButton(25)
> > Message "Homing All Axis"
> > While IsActive(input2)
> > Sleep(1000)
> > Wend
> > Code "M899"
> >
> > With My M899 as:
> >
> > Code "G00 A120"
> > Message "Homing Completed"
> >
> > This homes as it did before and then just the DRO's in Mach change to A120 (the axis don't actually move).
> > I then tried deleting the code "M899" from my homing script, and then ran the script and then manually in MDI mode entered the M899, again it stayed in position and just the dro's move to A120. So then I ran the home script, manually jogged the A axis (just a bit) and then ran the M899 and everything worked as it should have.
> >
> > Any thoughts
> >
> > Andrew
> >
> > --- In DynoMotion@yahoogro ups.com, "babinda01" <a_k@> wrote:
> > >
> > > Hi Tom
> > > Yes, I am using the patched version. My estop, and a couple of other inputs are working fine and they are connected to the opto inputs of the kanalog.
> > > For testing all I have been doing is looking to see if the input2 led will come on, on the diagnosics page of Mach3 - but no go. As I said, I can see the bits change in the kmaotion software , but I cant see it working on the mach3 leds.
> > > I will try a couple of these other bits you mentioned. I was thinking that the plugin only recognised certain bits as inputs and certain ones as outputs.
> > >
> > > Andrew
> > >
> > > --- In DynoMotion@yahoogro ups.com, Tom Kerekes <tk@> wrote:
> > > >
> > > > Andrew,
> > > >
> > > > You need to use the patched plugin to access IO's > 128.ÃâàAre you using this?
> > > >
> > > > Otherwise you might use IO46 or 47 which are the KFLOP LEDs.
> > > >
> > > > Or 48 - 63 are hidden Virtual Bits originally designed to be used as flags.
> > > >
> > > > How do you know it isn't working?ÃâàWhat is the symptom?ÃâàI was thinking there might be a race condition where your routine starts checking for the bit to go low before it actually gets set high?
> > > >
> > > > TK
> > > >
> > > >
> > > > ÃâÃÂ
> > > >
> > > >
> > > >
> > > > ____________ _________ _________ __
> > > > From: babinda01 <a_k@>
> > > > To: DynoMotion@yahoogro ups.com
> > > > Sent: Sat, February 27, 2010 5:47:28 PM
> > > > Subject: [DynoMotion] Re: Mach3
> > > >
> > > > ÃâÃÂ
> > > >
> > > > Hi Tom
> > > > I am having a little trouble still with getting a "homing completed" signal coming back to mach3.
> > > > In my homing C program I have added a SetStateBit( 160,1) at the start of my homing routine and then a SetStateBit( 160,0) at the end. This works ok, I can see the bits change on the IO screen of KMotion, but for the life of mee I cant get these signals back to Mach3 Input #2 which I have set as port 2 pin 32.
> > > > I was trying 160 because all my opto inputs are used for other things bits 128-135 appear to be used so 160-167 are all I have free.
> > > > Any thought on what I could try - is there another bit I should be trying?
> > > >
> > > > Regards
> > > > Andrew
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 186 |
From: babinda01 |
Date: 3/4/2010 |
Subject: Re: Mach3 |
Hi Tom
I have thought I would just give you a look at my homing code to see if I am doing something wrong in there:
#include "KMotionDef.h"
main()
{
int flags = persist.UserData[5]; // Mach3 flags bit0=X, bit1=Y, Bit2=Z, etc...
printf("Mach3 Home Call, flags = %d\n",flags);
SetStateBit(48,1);
Delay_sec(.1);
SetStateBit(48,1);
if (flags & 1)
{
Jog(5,-50000); // start moving X axis
while (!ReadBit(136)) ; // wait for switch (input #15) to change
Jog(5,0); // StopMotion
while(!CheckDone(5)) ;
Jog(5,5000); // start moving
while (ReadBit(136)) ; // wait for switch (input #15) to change
Jog(5,0); // StopMotion
Jog(5,-1000);
while (!ReadBit(1));
Jog(5,0);
while(!CheckDone(5)) ;
Delay_sec(.25);
DisableAxis(5);
Zero(5);
EnableAxisDest(5,0.0);
}
if (flags & 4)
{
Jog(4,50000); // start moving Z axis
while (!ReadBit(137)) ; // wait for switch (input #15) to change
Jog(4,0); // StopMotion
while(!CheckDone(4)) ;
Jog(4,-5000); // start moving
while (ReadBit(137)) ; // wait for switch (input #15) to change
Jog(4,0); // StopMotion
Jog(4,1000);
while (!ReadBit(0));
Jog(4,0);
while(!CheckDone(4)) ;
Delay_sec(.25);
DisableAxis(4);
Zero(4);
EnableAxisDest(4,0.0);
}
if (flags & 8)
{
Jog(6,1000); // start moving A axis
while (!ReadBit(2)) ; // wait for switch (input #15) to change
Jog(6,0); // StopMotion
while(!CheckDone(6)) ;
Delay_sec(.25);
DisableAxis(6);
Zero(6);
EnableAxisDest(6,0.0);
}
SetStateBit(48,0);
}
Regards
Andrew
--- In DynoMotion@yahoogroups.com, "babinda01" <a_k@...> wrote:
>
> Hi Tom
> I think I have the axis defined correctly. In my Init program I have DefineCoordSystem(5,-1,4,6)
>
> If I do a defineCS I get 5 -1 4 6
>
> I tried adding the NotifyPlugins(10000) but I am not sure what I should have in my NotifyMach.C program, I just have the default one, but this did'nt help at all either. Should I change my NotifyMach.c to something else???
>
>
> Regards
> Andrew
>
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Andrew,
> >
> > I looked through our Plugin code and I can't find a bug with regard to the A axis.
> >
> > You do have the A axis defined in the KFLOP Coordinate Systems don't you? If you type DefineCS on the console what is displayed?
> >
> > What if we try adding a dummy NotifyPlugins(10000) before the Sleep(1000) in your VB Script? If you don't already have a Notify KFLOP program create one that just prints the notification code or something (and use a code that you are not already using). After the KFlop Notification program finishes it should tell Mach3 to re-sync to the hardware state. See if it fixes the problem.
> >
> > Thanks
> > TK
> >
> >
> >
> > ________________________________
> > From: babinda01 <a_k@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Tue, March 2, 2010 4:47:31 PM
> > Subject: [DynoMotion] Re: Mach3
> >
> > Â
> > Hi Tom
> > I have done a bit of testing in regard to my homing problems, and I think your first point below is correct.
> > On my very first home command after mach3 has been started, the machine homes correctly and moves to the A120 position ok.. But any other homes after that it just ignores the A120 movement command and just changes the DRO to read 120.000.
> >
> > And your point 2 is correct also, if I jog the machine to A180 and then run my homing script the machine actually goes to A60.
> >
> > If I change my homing script from A120 to X12. this works every time, so it is something to do with the rotary axis.
> >
> > I hope this helps, if you need me to try other tests please let me know.
> >
> > Regards
> > Andrew
> >
> > --- In DynoMotion@yahoogro ups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hey Andrew,
> > >
> > > That is too strange...
> > >
> > > Where is A at before you start theÃÂ Homing process?ÃÂ I'm guessing that Mach somehow still thinks A is at 120 even though we homed.ÃÂ So then if we say go to 120 it doesn't move.ÃÂ Any jogging causes Mach3 to re-sync it's internal position.
> > >
> > > So to test that theory move to 180 before hand.ÃÂ Then after homing if Mach still thinks we are at 180, then a move to 120 would cause a motion of -60.
> > >
> > > What happens if you do something similar with the X axis instead of A??
> > >
> > > When the DRO changes to 120 does it change gradually like there was a motion?
> > >
> > > What is the DROÃÂ before the G00 A120 ??
> > >
> > > What does the KMotion Axis Screen say the raw steps are before and after?
> > >
> > >
> > > Sorry for all the questions and no answers :}
> > >
> > > TK
> > >
> > >
> > >
> > >
> > > ____________ _________ _________ __
> > > From: babinda01 <a_k@>
> > > To: DynoMotion@yahoogro ups.com
> > > Sent: Sat, February 27, 2010 8:30:13 PM
> > > Subject: [DynoMotion] Re: Mach3
> > >
> > > ÃÂ
> > >
> > >
> > > Hi Tom
> > > I am getting closer.
> > > I now have my homing complete signal working ok - using Bit 48 instead of 160 worked.
> > > Now for my next problem - it may be a bug in the plug-in (or else I am just stupid)
> > > If I have my Homing script in Mach3 like this:
> > >
> > > Message ""
> > > Code "G90 G54"
> > > DoButton(24)
> > > DoButton(22)
> > > DoButton(25)
> > > Message "Homing All Axis"
> > > While IsActive(input2) ### Input2 is activated by bit 48 to
> > > say homing is completed
> > > Sleep(1000)
> > > Wend
> > >
> > > Everything works perfectly...
> > >
> > > Then I changed it to:
> > > Message ""
> > > Code "G90 G54"
> > > DoButton(24)
> > > DoButton(22)
> > > DoButton(25)
> > > Message "Homing All Axis"
> > > While IsActive(input2)
> > > Sleep(1000)
> > > Wend
> > > Code "M899"
> > >
> > > With My M899 as:
> > >
> > > Code "G00 A120"
> > > Message "Homing Completed"
> > >
> > > This homes as it did before and then just the DRO's in Mach change to A120 (the axis don't actually move).
> > > I then tried deleting the code "M899" from my homing script, and then ran the script and then manually in MDI mode entered the M899, again it stayed in position and just the dro's move to A120. So then I ran the home script, manually jogged the A axis (just a bit) and then ran the M899 and everything worked as it should have.
> > >
> > > Any thoughts
> > >
> > > Andrew
> > >
> > > --- In DynoMotion@yahoogro ups.com, "babinda01" <a_k@> wrote:
> > > >
> > > > Hi Tom
> > > > Yes, I am using the patched version. My estop, and a couple of other inputs are working fine and they are connected to the opto inputs of the kanalog.
> > > > For testing all I have been doing is looking to see if the input2 led will come on, on the diagnosics page of Mach3 - but no go. As I said, I can see the bits change in the kmaotion software , but I cant see it working on the mach3 leds.
> > > > I will try a couple of these other bits you mentioned. I was thinking that the plugin only recognised certain bits as inputs and certain ones as outputs.
> > > >
> > > > Andrew
> > > >
> > > > --- In DynoMotion@yahoogro ups.com, Tom Kerekes <tk@> wrote:
> > > > >
> > > > > Andrew,
> > > > >
> > > > > You need to use the patched plugin to access IO's > 128.ÃâàAre you using this?
> > > > >
> > > > > Otherwise you might use IO46 or 47 which are the KFLOP LEDs.
> > > > >
> > > > > Or 48 - 63 are hidden Virtual Bits originally designed to be used as flags.
> > > > >
> > > > > How do you know it isn't working?ÃâàWhat is the symptom?ÃâàI was thinking there might be a race condition where your routine starts checking for the bit to go low before it actually gets set high?
> > > > >
> > > > > TK
> > > > >
> > > > >
> > > > > ÃâÃÂ
> > > > >
> > > > >
> > > > >
> > > > > ____________ _________ _________ __
> > > > > From: babinda01 <a_k@>
> > > > > To: DynoMotion@yahoogro ups.com
> > > > > Sent: Sat, February 27, 2010 5:47:28 PM
> > > > > Subject: [DynoMotion] Re: Mach3
> > > > >
> > > > > ÃâÃÂ
> > > > >
> > > > > Hi Tom
> > > > > I am having a little trouble still with getting a "homing completed" signal coming back to mach3.
> > > > > In my homing C program I have added a SetStateBit( 160,1) at the start of my homing routine and then a SetStateBit( 160,0) at the end. This works ok, I can see the bits change on the IO screen of KMotion, but for the life of mee I cant get these signals back to Mach3 Input #2 which I have set as port 2 pin 32.
> > > > > I was trying 160 because all my opto inputs are used for other things bits 128-135 appear to be used so 160-167 are all I have free.
> > > > > Any thought on what I could try - is there another bit I should be trying?
> > > > >
> > > > > Regards
> > > > > Andrew
> > > > >
> > > >
> > >
> >
>
|
|
Group: DynoMotion |
Message: 187 |
From: babinda01 |
Date: 3/4/2010 |
Subject: Re: Mach3 |
Hi Tom
I HAVE IT WORKING!!!!!!!!!
I don't really understand the how's and why it is working but it is.
After a refreshing ale, I realised what you were suggesting to do in regard to using the NotifyPlugin(10000) command, so in my notifyMach3.C program I added an if statement for the 10000 message, and then just did a simple printf("blah blah") statement. I then in my vb script in mach added the notifyplugin(10000) before my commanded A120 and then put a sleep(500) after the notifyplugin. This worked. I understand that after this notifyplugin kflop is sending a reset counters through to mach3 - I don't understand why my plain homing script doesn't.
Anyway for now it is working - I think it needs a little polishing though.
Regards
Andrew
|
|
Group: DynoMotion |
Message: 188 |
From: csipike3000 |
Date: 3/5/2010 |
Subject: Mach3 |
Hi everybody
I recently installed a Kflop, with Mach3 and stepper motors.
I try to use in STEP_DIR_MODE, made the configuration and with KMotionCNC works fine.
Mach3 have a lot of step losses, in single step mode the steps are different in size, the acceleration once ok at the next step no ramp.
If I use LPT it's ok. With other computer the same.
What is the problem?
|
|
Group: DynoMotion |
Message: 189 |
From: Tom Kerekes |
Date: 3/5/2010 |
Subject: Re: Mach3 |
Hi,
Please supply a few details.
What do you mean by single step mode? A single line of G Code?
What do you mean by steps are different size? Pulse period? Frequency?
What are the Mach3 Velocity and Acceleration settings in the Mach3 "Tuning" screen?
Thanks
TK
Group: DynoMotion |
Message: 190 |
From: László Debreceni |
Date: 3/5/2010 |
Subject: Re: Mach3 |
Hi,
I mean jogging with fixed distance, eg. 1mm.
Without plugin works fine, with plugin the first jog step 1mm after the steps are short.
Mach Velocity 4000 mm/min Acceleration 1000 mm/min.
Thanks
István --- On Fri, 3/5/10, Tom Kerekes <tk@...> wrote:
From: Tom Kerekes <tk@...> Subject: Re: [DynoMotion] Mach3 To: DynoMotion@yahoogroups.com Date: Friday, March 5, 2010, 8:02 PM
Hi,
Please supply a few details.
What do you mean by single step mode? A single line of G Code?
What do you mean by steps are different size? Pulse period? Frequency?
What are the Mach3 Velocity and Acceleration settings in the Mach3 "Tuning" screen?
Thanks
TK
Group: DynoMotion |
Message: 191 |
From: Tom Kerekes |
Date: 3/5/2010 |
Subject: Re: Mach3 |
Hi István,
I still have a hard time understanding what is happening.
You Jog one step of 1 mm using the arrow keys and it miss steps?
How do you know it miss steps - the DRO is wrong or the physical distance moved is wrong?
Is your counts/units wrong?
Is it consistantly short? How many steps?
What about G0 and G1 commands do they move correctly?
What about a 100mm move?
Run KMotion.exe and observe the Destination counts on the Axis screen. Did the counts change correctly?
KMotion and KMotionCNC use "S" shape motion when jogging. Mach3 uses trapaziodal. Possibly that is the difference. Try setting the Jerk in KMotion.exe to infinity (1e9) and see if you have similar problems.
TK
Group: DynoMotion |
Message: 193 |
From: László Debreceni |
Date: 3/6/2010 |
Subject: Re: Mach3 |
Hi Tom!
Thank for helping.
The case is more complicated, I make a several 1 mm steps, after the first one even the DRO is wrong, without the plugin the DRO is ok. I check the physical travel, not equal to the DRO. I changed the V and the A to a very low value, still the same problem.
I checked whit an other computer, the problem is the same.
--- On Fri, 3/5/10, Tom Kerekes <tk@...> wrote:
From: Tom Kerekes <tk@...> Subject: Re: [DynoMotion] Mach3 To: DynoMotion@yahoogroups.com Date: Friday, March 5, 2010, 10:56 PM
Hi István,
I still have a hard time understanding what is happening.
You Jog one step of 1 mm using the arrow keys and it miss steps?
How do you know it miss steps - the DRO is wrong or the physical distance moved is wrong?
Is your counts/units wrong?
Is it consistantly short? How many steps?
What about G0 and G1 commands do they move correctly?
What about a 100mm move?
Run KMotion.exe and observe the Destination counts on the Axis screen. Did the counts change correctly?
KMotion and KMotionCNC use "S" shape motion when jogging. Mach3 uses trapaziodal. Possibly that is the difference. Try setting the Jerk in KMotion.exe to infinity (1e9) and see if you have similar problems.
TK
Group: DynoMotion |
Message: 194 |
From: Tom Kerekes |
Date: 3/6/2010 |
Subject: Re: Mach3 |
Hi István,
Sorry I don't know the reason. It normally works.
Please answer my questions in the previous email.
And here is another question :} what do you mean by "without the plugin"?
Also please report the versions of KFLOP Firmware (type version on the Console Screen), the KMotion.exe progam (Help - About), and the Mach3 Plugin (Config - Plugins). They should all match.
Thanks
TK
| |
|
| | | |
|
| | | | | | | | | | | | | | | | | | | | | | | |