Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: johnny on September 16, 2012, 01:55:38 PM

Title: S code problem
Post by: johnny on September 16, 2012, 01:55:38 PM
I am Johnny , , I bought a shopmaster patriot. Dan helped me up date a few things but we could never get the S code to work. No mater what S### you use, it runs 500. Dan tried to help me on the phone but we didn't get it done and of course his time is quite valueable. Any help would be a good thing.
Title: Re: S code problem
Post by: Hood on September 16, 2012, 05:02:25 PM
Do you have a link to a manual for that machine?
Hood
Title: Re: S code problem
Post by: johnny on September 17, 2012, 01:25:17 PM
in a round about way. The manual was sent in a pdf file , I found a link in another forum. There is 2 links here. My book is  for the E 100 series not the A 100

http://www.cnczone.com/forums/shopmaster_shoptask/121040-2010_patriot_vfd_inverter_manual.html
Title: Re: S code problem
Post by: Hood on September 17, 2012, 02:32:18 PM
What is your spindle controller? I assume the VFD takes a 0-10v input for speed so you must have some form of controller that can convert either PWM or Step signals to 0-10v.
Hood
Title: Re: S code problem
Post by: johnny on September 17, 2012, 11:16:51 PM
I am a electronics dummy but I believe you mean the gecko G540. I sent pics to Dan and he checked things and had me up date 5 wires and change settings in the configuration. Every thing worked but the S code and of course Dan can't keep messing with me
Title: Re: S code problem
Post by: Hood on September 18, 2012, 02:52:36 AM
Ok that will be it as I believe the G540 can output an analogue signal.
If you attach your xml I will have a look and see how you have it set up.
Hood
Title: Re: S code problem
Post by: johnny on September 18, 2012, 02:39:07 PM
C:\Documents and Settings\Owner\Desktop\G540SHOPTASKINDEX.xml
Title: Re: S code problem
Post by: Hood on September 18, 2012, 02:49:07 PM
You will have to use the additional options button on the reply page to browse to that file and attach to the forum.
Hood
Title: Re: S code problem
Post by: johnny on September 18, 2012, 06:55:54 PM
We will try  this.
Title: Re: S code problem
Post by: Hood on September 19, 2012, 03:00:59 AM
Try changing the Spindle Relays to 1 and 2 (config menu then Ports and Pins then Spindle Setup)

Hood
Title: Re: S code problem
Post by: johnny on September 20, 2012, 01:34:14 AM
Okay, that didnt do any thing one way or the other. I had the machine in manual control. When I switched it back to CNC mach3 I had no rotation at all with a S code. I will add the changing codes for spindle control. I really feal the problem is in this code
Title: Re: S code problem
Post by: johnny on September 20, 2012, 01:34:50 AM
oops forgot the code, , next
Title: Re: S code problem
Post by: johnny on September 20, 2012, 01:36:16 AM
try this
Title: Re: S code problem
Post by: Hood on September 20, 2012, 03:10:12 AM
Ok go to Config then Ports and Pins then Motor Setup and change the spindle Dir to 0. Next go to Spindle setup and set the Min PWM to 5 and see if that helps.
Hood
Title: Re: S code problem
Post by: johnny on September 21, 2012, 12:34:28 AM
No Help. Spindle Dir was 0. MinPWM was 0, now 5. I did notice ( maybe it was always there) but lower left corner. Under Spindle speed a yellow bar was flashing. I clicked on Spindle CW F5 and then the yellow  bar and it quit but as soon as I coded another code it was flashing again
Title: Re: S code problem
Post by: Hood on September 21, 2012, 02:50:06 AM
The yellow flashing means Mach has switched on the spindle. Does this flash as soon as you start Mach or do you have to run some code for it to start?

How do you have the VFD wired?
Hood
Title: Re: S code problem
Post by: johnny on September 21, 2012, 02:41:01 PM
spindle speed light only flashes when M3 or 4 is coded. Not a S code,
<
Geckodrive, 4 axes stepper motor system is used
VFD top row, left to right: V1 red, to 5 on gecko V2 blue to 6 on G dr, com, black, to 7  on G Dr
<
VFD bottom row. com , black to power supply Grd. AN1 is green to 9 on G Dr. 12V Red to 9 on G dr.
<On Gecko Dr, is gray to stepper switch  11 is Red to Power S . 12 IS Black to power s.

Hope this helps
Title: Re: S code problem
Post by: Hood on September 21, 2012, 03:06:17 PM
What I think I would first do is grab a volt meter and see if the Gecko is putting out voltages correctly in relation to commanded spindle speeds and yes you nned to call a M3/M4 as well as the S word. If you just command a S500 without telling Mach to turn the spindle on with a M3/4 then you will just set the spindle speed DRO but not actually turn the spindle on at that speed.
Hood
Title: Re: S code problem
Post by: johnny on September 21, 2012, 10:11:40 PM
I coded G1 X5.0 both M4 and 3 S200 and 800. I see no notable difference with one exception.
AN1 is lower at 12.44 volts. the other points are all close to 12.98. What wire runs speed or is it a combination of wires. Grabbing at threads here  wondering if maybe a wire is missing
Title: Re: S code problem
Post by: Hood on September 22, 2012, 04:28:27 AM
Just looked at the Gecko manual and you should be measuring between the pins highlighted in the pic below. If it still doesnt look right then make sure you disconnect them from your VFD and try again as your VFD may be connected wrong.
Hood
Title: Re: S code problem
Post by: johnny on September 22, 2012, 06:49:41 PM
Pin 7 is black to com on VFD. . Pin 8 is red to 12 V on VFD
<
G1 X5.00 M3 S200 and S200 and so on
<
I ran checks on both M3 and M4 speed both S200 and S800
<
All 4 test voltage was the same 12.98 V
Title: Re: S code problem
Post by: Hood on September 22, 2012, 07:07:20 PM
Are you sure that is the correct way to hook to VFD, I read the the Gecko manual and my understanding would be
Pin 7 to com on VFD, so thats OK
Pin 8 to 0-10v input of VFD
Pin 9 to voltage output from VFD.

You may be better calling Gecko and seeking their advice before connecting as I suggest however.

Hood
Title: Re: S code problem
Post by: johnny on September 22, 2012, 07:37:15 PM
I did find something else too in reading gecko manual. Pin 10 is suppose to go to the E Stop or be jumpper ed. I have no Estop or jumper
<
STEP 2: INSERT E-STOP OR JUMPER
The G540 is designed to fault unless there is a normally closed switch (functionally identical to a jumper wire) between TERMINAL 10 and TERMINAL 12 on the 12-PIN TERMINAL BLOCK. Without TERMINAL 10 shorted to ground the G540 will remain disengaged to the motors and will not respond to commands. The red LED will be illuminated if there is no jumper connecting these two terminals.
<
Those wires 7, 8 & 9 were supplied by Dan Mauch with instructions on re wiring this machine. It wasn't factory set to run mach 3 except with a manual speed control on the VFD. Forward and reverse were on  the same button now disconnected.
<
Pin 10 now runs the led light on the panel. Maybe that's the red light It comes on with the CNC power switch.
<  The Serial number on  this machine is 013 . Maybe thats why.
Title: Re: S code problem
Post by: johnny on September 24, 2012, 12:55:20 AM
The wiring is correct according to JT but  one thing I found out is that pin 9 on the Gecko expects 10vdc to provide a relatively linear output. If you wire it as JT says you get 12v, you won't be able to get anything like linear control from Mach3. The potentiometer on the front panel will work just fine. Is there a way around this or am I stuck with a manual controlled machine
Title: Re: S code problem
Post by: johnny on September 24, 2012, 01:14:53 AM
 forgot the drawing
Title: Re: S code problem
Post by: johnny on September 27, 2012, 01:34:08 AM
Hood, you are correct and I was relying to much on Dan to see it. . Pin8 goes to A1N1 and pin 9 goes to 12 volt. After making the change it still doesn't work so I have more settings  to check. I have all the answers but I am not sure what to do with them ROFL
Title: Re: S code problem
Post by: Hood on September 27, 2012, 01:39:16 AM
Have you measured the output from the board with the revised wiring?
It may be your VFD is not set correctly for that input as often they are set to front panel as default for speed control.
Hood
Title: Re: S code problem
Post by: johnny on September 27, 2012, 01:59:00 AM
I haven't. I contacted JT and he sent me a diagram of all wiring and I finely saw that mistake. He sent me some topical settings to do and I did them but looking at one diagram I am not sure its right, having to do with motor outputs and also spindle control. But what I am really wondering is if the VFD is unlocking from manual and going to CNC. I know last test it didn't as I could turn to the VFD and run that manually
Title: Re: S code problem
Post by: johnny on September 27, 2012, 05:12:02 PM
checked voltage as follows:
M3 S200 0.993 V
M3 S800 3.706 V
M4 S200 0.976 V
M$ S800 3.784 V
Title: Re: S code problem
Post by: Hood on September 27, 2012, 05:29:31 PM
Not sure how linear the G540 output is normally but looks fairly good.
Hood
Title: Re: S code problem
Post by: johnny on September 27, 2012, 11:30:54 PM
 In Post 19 is the way to change from manual to CNC. Disable factory lock/ / It works a follows // enter>p0 is displayed>^ once p1 displayed, enter, p1-000 displayed. enter> 000001 is not but 000000 is. enter p1-000 is ESC 2 times as I read it 000001 & 000000 is the key to lock an unlock.

to change from manual to mach3 control as follows// enter>P0 is displayed, not p0-000 , , enter>P0-000 is displayed, ,  enter>000001 is displayed, not 000000.,,enter>P0-000 is displayed, , ^till p0-002 is displayed, , enter>000002 is displayed not 000000,, , enter>p0002 is displayed ESC 2 times. (as you can see, it skips steps).

Also I coded in x5.00 m3 s200. On the screen it was moving but the machine was not. Also I still had hand VFD control for speed
Title: Re: S code problem
Post by: johnny on September 30, 2012, 05:23:19 PM
Hood Thanks for your Help. I now have it all working but M5. Maybe I need to run thru the settings again
Title: Re: S code problem
Post by: Hood on October 01, 2012, 03:02:31 AM
Not sure what that could be except possibly your M5 macro is corrupt.
Hood
Title: Re: S code problem
Post by: johnny on October 01, 2012, 02:07:49 PM
Hood, ent thru VFD settings gain, , got it working, , thanks again for your help and llistening o me gab straws
Title: Re: S code problem
Post by: Hood on October 01, 2012, 03:27:31 PM
Glad you got there :)
Hood