Hello Guest it is April 19, 2024, 04:01:50 AM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - sour kraut

Pages: « 1 2 3 »
11
Mach4 General Discussion / Re: Mach4 Signal Script
« on: November 17, 2016, 11:05:12 AM »
So I need to move the whole function ButtonJogModeToggle() code from the screen load script to the PLC script?  I can do this but I don't understand why the signal script doesn't recognize input 63 and pass the signal to the signal library in the screen load script like every other post says it should?  Luckily I was able to get this very feature to work in the  PMC just not 5 minutes ago but I wanted to do it in LUA to learn the code better.

12
Mach4 General Discussion / Mach4 Signal Script
« on: November 16, 2016, 02:44:46 PM »
I'm having issues calling the SigLib in the screen load script and for the life of me I don't know what's going on.  I have searched these forums and gone through the scripting PDF that is installed with the software( which needs to be fixed!! ) but can't find the answer.  Here's what I am wanting to do:
I want to assign a key on the keyboard to perform the same task as the "Button Jog Mode" Button. If I press it, the state will change from "Continuous" to "Incremental" or vice versa.

Here is what I have done so far:

1. Assigned a new input inside of the keyboard plugin and then assigned it to input 63 per the "Quicky 2" video.
2. Verified that the input is working in the diagnostics log.
3. Added the following code to the Screen Load script. It is truncated for simplicity.
Code: [Select]
SigLib = {
[mc.OSIG_MACHINE_ENABLED] = function (state)
    machEnabled = state;
    ButtonEnable()
end,

[mc.ISIG_INPUT0] = function (state)
   
end,

[mc.ISIG_INPUT63] = function (state)
    if (state == 1) then   
        --CycleStart()
        ButtonJogModeToggle()
    --else
        -- Do something else
        --mc.mcCntlFeedHold (0)
    end

end,
}

4. Added the following code to the Screen Load script.
Code: [Select]
if (SigLib[mc.ISIG_INPUT63] ~= nil) then
    SigLib[mc.ISIG_INPUT63](state);
end

If I put the information into the PLC script like in the video instead of in the screen load and signal scripts, then the state of the button changes continuously while the button is held down.  Please help me as I have searched and cannot find an exact, consice answer.  Thank you for looking.

13
PoKeys / Re: 56U incorrect motions
« on: March 27, 2015, 08:44:48 AM »
That I did not. I was under the impression that the g540 had opto couplers built into it. I'll have to verify this. I'll get some on order to test.

14
PoKeys / Re: 56U incorrect motions
« on: March 26, 2015, 09:00:33 AM »
So how can I change the step and direction polarity to test?  The Gecko G540 is a parallel cable drive that does not allow for this.  Is there a spot in the plugin that I can do this that I missed?  Will I need to build an invertor circuit?

15
PoKeys / Re: 56U incorrect motions
« on: March 24, 2015, 11:26:08 PM »
I was reading up on the G540 and it has to have the direction pin set 200ns before the step rising edge and hold for 200ns after the rising edge. I haven't got it on an oscilloscope yet but I think the 74hct595 sets the step and direction relatively at the same time plus or minus a few nanoseconds. This is why it is giving me half the distance moving one direction and full distance moving in the other.  I'd like to hear from anyone else that has tried to connect to a G540 using the external motion controller to see if they have had any luck.  Again, thanks in advance.

16
PoKeys / Re: 56U incorrect motions
« on: March 23, 2015, 11:30:04 AM »
I built the circuit that is in the back of the pokeys motion controller pdf.  It works great with my cheaper drives that have the differential inputs but doesn't work with the Gecko G540.  Unfortunately I'm at work so I can't check the firmware version but last night I downloaded and updated all the pokeys software, including the firmware, just to make sure.  My next step is to connect it to another G540 I have available to me to see if it is just my G540.

17
PoKeys / Re: 56U incorrect motions
« on: March 23, 2015, 12:03:45 AM »
So here's a brief update...  I tried a different computer and was getting the same issues.  I then disconnected my G540 from the external 4 axis circuit and connected some Chinese drives.  They moved exactly the same distance in both plus and minus directions.  I think the issue is the step and direction minimum pulse widths needing to be 2us for the gecko and the pokey external controller cannot supply that consistently.  Anyone have any thoughts on this?

18
PoKeys / 56U incorrect motions
« on: March 22, 2015, 06:13:16 PM »
I've got a 56U connected as an external 4 axis controlller using the circuit in the pokeys manual feeding into a G540.  when I give it a command on the MDI line to go positive on any of the 3 axis, it goes the correct distance.  If I give it the same command but make it negative, it only goes half the distance.  I'm running mach Version R3.043.067 and the pokeys plug in 1.0.0.1.  I have mach set for 45000Hz and the max step for any axis is 12000. I am using Windows 7 64bit on an HP pavilion G series laptop if that matters any. I have double and triple checked my wiring to make sure it is correct.  Has anyone seen this before?  Thanks in advance.

19
PoKeys / Re: Step and Direction pulse width?
« on: February 07, 2014, 11:19:02 AM »
I got everything changed over to the parallel port and still had the same issue with the shaking and loss of steps so it's the drives or the power. I did not have the issue though of mach showing the programmed speed but then showing actual being half of it like I did with the pokeys.  Anyone have any thoughts on that?

20
PoKeys / Re: Step and Direction pulse width?
« on: February 06, 2014, 11:30:53 PM »
I checked the progress bar and it doesn't even show anything when I use the arrow keys to jog.  when I command the x or y with a rapid move in the MDI then it shows but its not even a quarter of the bar.  I haven't tried the Parallel port yet but I'm starting to lean to it being the drives or the power supply.  I'm still going to parallel just to rule out the pokey though.  I'll keep it updated.

Pages: « 1 2 3 »