Machsupport Forum

Third party software and hardware support forums. => PoKeys => Topic started by: GerdS on September 13, 2015, 04:45:13 AM

Title: Can i change the Pulse engine parameters without the Pokeys Program ?
Post by: GerdS on September 13, 2015, 04:45:13 AM
Last days i am little bit experimenting with the Pokeys Pulse Engine, CNC Addon Board two stepper and two encoders.
My future plan is to convert my chines lathe to CNC. But the machine should also be used in a conventional way.

The idea is to use the two Encoder wheels instead of the current wheels to drive the machine.
With the pulse engine and the Jogging mode, this could work without any lags.
But to activate the Jogging mode and changing the Encoder multiplier i need to start the Pokeys Software.

Is there a way to control this internal Pulse engine parameters with the Pokeys board directly.
Maybe routing the parameters to any output or input pins of the board. ?
Then i could activate or change this parameters with switches.

One other question, what can i do with the Jog speed slider on the bottom of the Pulse engine dialog. ?
I tried to adjust, but not really happens when i turned the encoders.
Title: Re: Can i change the Pulse engine parameters without the Pokeys Program ?
Post by: NeoTO on September 13, 2015, 07:04:46 AM
Pulse engine can be accessed from PoBlocks.

PoBlocks is our programming environment that allows users to create a program that is executed by the device itself and is stored in the device.

Unfortunately, Pulse engine has so many options that there is no simple block for managing it, so Custom PoIL code can be used to access the Pulse engine registers directly (more info on PoIL and registers can be found in PoIL.pdf document in PoKeys installation folder).
I attached a few examples on configuring and using Pulse engine from PoBlocks.
Title: Re: Can i change the Pulse engine parameters without the Pokeys Program ?
Post by: GerdS on September 13, 2015, 09:52:59 AM
Wow , i just tried to understand what's going on in your examples.  ???
It seems to be very difficult to understand and it needs a lot of practice to get usable results.
Is there a future plan to implement the Pulse engine module in to Poblocks for more user friendly usage. ?
Title: Re: Can i change the Pulse engine parameters without the Pokeys Program ?
Post by: NeoTO on September 13, 2015, 10:01:29 AM
There is a plan to implement this in more user-friendly way. Unfortunately, it is not an easy thing to do and a long list of other requests are waiting to be implemented beforehand.

If you describe exactly what you want to accomplish, we can provide you with an example for you to start building from.
Title: Re: Can i change the Pulse engine parameters without the Pokeys Program ?
Post by: GerdS on September 13, 2015, 10:28:56 AM
Actual quite easy. :-))
When i going to start the machine inkl. Pokeys then the Encoder should be off.
So i need a switch to activate and deactivate the Jogging mode State 10
Then i could move the Axis with the encoder wheels.
I need also an adjustment for the Multiplier. So in steps of 1 , 10 , 30 ,50. for example. With this i could adjust the speed.
I tried to use the "Jog speed" slider but i could not get any changes in Jog speed.
I think this both function should be enough to work with the machine.
For cnc i would use use mach3.
I need the lathe very often and if the machine is a CNC machine, then it is not so easy to just cut a screw etc.
I was really surprised how good the motors are moving without mach3 an no time lags.
Therefore my idea was to use the encoders for manual working with the machine.
Title: Re: Can i change the Pulse engine parameters without the Pokeys Program ?
Post by: NeoTO on September 13, 2015, 12:20:53 PM
The jog speed slider is used for button-based jogging, so it does not apply to MPG jog.

Try the example from the attachment. The input 1 is used to activate or deactivate the MPG jogging mode, while the other 4 inputs are used to select the multiplier.
Title: Re: Can i change the Pulse engine parameters without the Pokeys Program ?
Post by: GerdS on September 13, 2015, 05:41:19 PM
Wow, that really works perfectly.
A big thanks to you for your help :-))
But how can i get running without Poblocks.
When i close the Poblocks nothing happens anymore.
Do i need the Batterie to persist the program in memory. ?

I found a little confusion about the target device.
My board is a 57E, but it shown in the device manager as 56E.

How can i change from y to z axis.
# Setup encoder 1 for x and encoder 2 for y axis
LOAD DL[1]
STORE Bh09A8
LOAD DL[2]
STORE Bh09A9
Title: Re: Can i change the Pulse engine parameters without the Pokeys Program ?
Post by: NeoTO on September 13, 2015, 11:54:51 PM
There is a project setting 'Auto start' - set this one to 'True' and it will start automatically next time.

If your device is detected as PoKeys56E, then it is still running the PoKeys56 series firmware it got shipped with. Update to PoKeys57 series by executing Device > Upgrade firmware in PoKeys application.

The registers 0x09A8 and 0x09A9 contain the encoder/MPG indexes. In order to use the encoder 2 for axis z, write 0 into 0x09A9 (disable encoder 2 for axis y) and write 2 into 0x09AA.
LOAD DL[1]
STORE Bh09A8
LOAD DL[0]
STORE Bh09A9
LOAD DL[2]
STORE Bh09AA
Title: Re: Can i change the Pulse engine parameters without the Pokeys Program ?
Post by: GerdS on September 15, 2015, 02:17:49 AM
It works perfect now. So instead of the switches i could also use a potentiometer to control the speed.
And if i thinking further, you could also create a controller for a machine without using a pc.
Automatic feed motion to a specific point is just a idea.

I tried to understand this kind of programming language (looks like assembler) but this is to much effort for me.
So for now i going to plan the the motifaction of the machine this takes enough time.
And i will wait until all Pulse engine parameters are available in a newer Poblocks version.
Again thank you for your help.
Title: Re: Can i change the Pulse engine parameters without the Pokeys Program ?
Post by: GerdS on December 06, 2015, 01:17:07 PM
Hello Matevž, my machine CNC conversion becomes nearly solid.
If you remember ? I wanted to use my encoders with Pokeys to drive my machine without connect to a computer.
That Program you sent me works perfect for the beginning.
But, is it possible to keep the program in to the board memory without any side effects when i use mach3 to drive the same pokeys board. ?

Regard
Gerd
Title: Re: Can i change the Pulse engine parameters without the Pokeys Program ?
Post by: NeoTO on December 07, 2015, 12:09:40 AM
Hi, Gerd

Mach3 plugin will not 'harm' the PoBlocks program, but I would suggest to implement some mechanism (like a signal from a physical switch) to block the PoBlocks program from affecting the Pulse engine - unpredicted behaviour can occur if both PoBlocks and Mach3 are commanding the motors.