Pokeys

More
18 Jun 2024 20:43 #303300 by JohnvE
Replied by JohnvE on topic Pokeys
Hello,
I am running 2.8. I am not very experienced with LinuxCNC but got it all running with the parports. Now I try to get it working with the pokeys57CNC but there are almost no examples so I don't know what files I have to change. It is more than only following the instructions on page 10 I guess. Do I have to change the .hal and .ini files also and if yes are there good examples?
The machine_is_on changes the state of the pokeys when assigned correctly and just 1 time I managed that but I lost it somewhere in the process.
Apology for the late response. I wasn't notified of a reply. I checked the box now.

Please Log in or Create an account to join the conversation.

More
27 Aug 2024 18:11 #308838 by Hauligali22
Replied by Hauligali22 on topic PoKeys HAL Driver
Hello,

I am attempting to convert my 5axismaker machine (5axismaker.co.uk/5xm-overview) to run on LinuxCNC as it currently runs on Mach4 with a Pokeys57U control board. The vendors couldn't assist with how to convert the machine so I was wondering first if it is possible to convert the machine and second if these instructions are the correct procedures for converting the machine? Thanks!

Please Log in or Create an account to join the conversation.

  • zarfld
  • Away
  • Junior Member
  • Junior Member
More
09 Nov 2024 21:33 #314143 by zarfld
Replied by zarfld on topic Pokeys
the comp In "Page 10" can Just read/write Pins ( digital in) for movement you'd need to use the PEv2 as Pulse generator for stepoers. In 2.8 i got IT working so that o could move the axes, but the came to the homing topic which caused that i Had to move to 2.9.2 where had Strange issues (AS reported in one of my previous Posts Here).

Some weeks ago i started to Work in that topic again an currently found Out that in 2.9.3 some of the issues reported before we're Not reproducible. But still have Performance issues when i add the pokeys_homecomp in the ini for homing
My actual configuration can be found Here github.com/zarfld/LinuxCnc_PokeysLibComp i did a rough description maybe that helps a bit ( it's far from being a full and structured technical documentation) For now i think to keep IT running in Carport until i could fix the homing topic, i you want to give IT a try i could also Help on updating your HAL and ini based on your machine.

Please Log in or Create an account to join the conversation.

  • zarfld
  • Away
  • Junior Member
  • Junior Member
More
09 Nov 2024 21:41 #314144 by zarfld
Replied by zarfld on topic PoKeys HAL Driver
Hi, that Sounds Like a big Project to convert. For Pokeys57U i think you also use an PoExtBusOC16CNC as Steppgenerator? I wonder If IT makes sense to use your mach3 configurations AS Base for conversion to a linuxcnc HAL. I heard that the configurations are stored in some XML Files but i have No Idea about the structure of These File(s?).

Please Log in or Create an account to join the conversation.

  • zarfld
  • Away
  • Junior Member
  • Junior Member
More
04 Mar 2025 18:16 - 04 Mar 2025 20:25 #323166 by zarfld
Replied by zarfld on topic Pokeys
Hi,

i currently try to finalize the homing_comp for pokeys. it seem to basically work, but at the end where the sychronized axes should finish their homing. they are still shown as unhomed. (sometimes one of them got marked homed but never both of them)

 
 


Somehow it seems that i'm missing something, but i cannot figure out if i need to set a HAL flag or missed a step which is required to be done to finalize overall homing.

Can some one please point me in the direction where to look at? 

[TRAJ]
COORDINATES =  XXYZ

[JOINT_0] 
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = -1.000000
HOME_LATCH_VEL = -0.500000
HOME_FINAL_VEL = 0.000000
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = -3

[JOINT_1]
HOME_OFFSET = 4.100000
HOME_SEARCH_VEL = -1.000000
HOME_LATCH_VEL = -0.500000
HOME_FINAL_VEL = 0.000000
HOME_USE_INDEX = NO
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = -3

[JOINT_2]
HOME_OFFSET = 0.0
HOME_SEARCH_VEL = -3
HOME_LATCH_VEL = 1
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 2

[JOINT_3]
HOME_OFFSET = 0.5
HOME_SEARCH_VEL = 3
HOME_LATCH_VEL = 1
HOME_IGNORE_LIMITS = YES
HOME_SEQUENCE = 1


if it is required my home_comp can be found here github.com/zarfld/LinuxCnc_PokeysLibComp...pokeys_homecomp.comp

it basically comminicates with pokeys.comp by a status and a command signal using following enumerations for each joint seperately

typedef enum
{
    PK_PEAxisState_axSTOPPED = 0, // Axis is stopped
    PK_PEAxisState_axREADY = 1,   // Axis ready
    PK_PEAxisState_axRUNNING = 2, // Axis is running

    PK_PEAxisState_axHOMING_RESETTING = 8,   // Stopping the axis to reset the position counters
    PK_PEAxisState_axHOMING_BACKING_OFF = 9, // Backing off switch
    PK_PEAxisState_axHOME = 10,              // Axis is homed
    PK_PEAxisState_axHOMINGSTART = 11,       // Homing procedure is starting on axis
    PK_PEAxisState_axHOMINGSEARCH = 12,      // Homing procedure first step - going to home
    PK_PEAxisState_axHOMINGBACK = 13,        // Homing procedure second step - slow homing

    PK_PEAxisState_axPROBED = 14,      // Probing completed for this axis
    PK_PEAxisState_axPROBESTART = 15,  // Probing procedure is starting on axis
    PK_PEAxisState_axPROBESEARCH = 16, // Probing procedure - probing

    PK_PEAxisState_axERROR = 20, // Axis error
    PK_PEAxisState_axLIMIT = 30  // Axis limit tripped
} pokeys_home_state_t;

typedef enum
{
    PK_PEAxisCommand_axIDLE = 0,           // Axis  in IDLE
    PK_PEAxisCommand_axHOMINGSTART = 1,    // Start Homing procedure
    PK_PEAxisCommand_axHOMINGCANCEL = 2,   // Cancel Homing procedure
    PK_PEAxisCommand_axHOMINGFINALIZE = 3, // Finish Homing procedure
} pokeys_home_command_t;
Attachments:
Last edit: 04 Mar 2025 20:25 by zarfld.

Please Log in or Create an account to join the conversation.

  • zarfld
  • Away
  • Junior Member
  • Junior Member
More
06 Mar 2025 19:12 - 07 Mar 2025 09:05 #323359 by zarfld
Replied by zarfld on topic Pokeys
what i found out in the meanwhile that at the time where the cyclic of do_homing() seem to be stopped, one of the synchronized joints is still in status "PK_PEAxisState_axHOMING_BACKING_OFF". but it allway seems to stop when the status changed to PK_PEAxisState_axHOME.

in that cas it's legit that one of them is still not homed, but for me is still unclear why the cyclic calls of do_homing() are being stopped.
the other miracle is why the flags of both joints are set to:
.homed = 1
.homing =0

edit 7 new findings:
i now tried to workaround the problemb changing the home Sequences so that the Y will get Home sequence 3. and X&X2 get home_sequence -2: that endet up that now the joint for Y doesnt get homed (i mean halui.joint.2.is-homed still shows 0)
   
that seems that it is not related to the synchronized homing sequence of joint.0 and joint.1, but more likely to the last sequence that is being homed.
and also logging showed that the cyclic calls of do_homing() (or all calls to home_comp) are being stopped right at the moment when the PulseEngine Status changed to 10 (= homed). 

as i'm quite sure that Linuxcnc motion or Halui know nothing about PE_AxisState, i think it is not the status change itself but something related to it, but i didnt see the debug message message. that do_homing() returned 1. so it is most likely something else
Attachments:
Last edit: 07 Mar 2025 09:05 by zarfld. Reason: new findings

Please Log in or Create an account to join the conversation.

  • zarfld
  • Away
  • Junior Member
  • Junior Member
More
07 Mar 2025 15:37 #323425 by zarfld
Replied by zarfld on topic Pokeys
Hi All,

it seems that i found the issue by accident   : it seemed that some part of motion still checks the home-switch-in even if they don't have a direct influence on my homing-procedure. (that is completely outsourced to pokeys, i just await the home status, the home-switch information is there but more or less for informative purposses. i didn't use these switches at all, but it seems theres some part of motion which checks that in background)

Attachments:

Please Log in or Create an account to join the conversation.

  • zarfld
  • Away
  • Junior Member
  • Junior Member
More
27 Mar 2025 22:02 #325111 by zarfld
i now tried to extend the homing workflow to better align to the Linuxcnc usual homing.

my home states are :

PK_PEAxisState_axREADY   -> before homing
when Homing is triggered the pokeys internal Homingprocedure does the following states
 - PK_PEAxisState_axHOMINGSTART 
 - PK_PEAxisState_axHOMINGSEARCH 
 - PK_PEAxisState_axHOMINGBACK 
- PK_PEAxisState_axHOMING_RESETTING
- PK_PEAxisState_axHOMING_BACKING_OFF
 - (  PK_PEAxisState_axHOME ) that status of pulse engine is suppresed and 

after that i have to finalize the pokeys homing procedure by a "PK_PEv2_HomingFinish" command in order to operate that joint again for tho upcoming steps there fore i added two additional steps: 
    PEAxisState_axReadyToFinalizeHoming  -  used as a indicator from pokeys.comp to pokeys_homecomp that the homing finalize command can be triggered

    PK_PEAxisState_axReadyToArmEncoder  in this step that index search part should take place, in that step my intention was to reset the position feedback to ZERO_POSITION, to prevent problems on pokeys due to the (softlimits on the device side).

on the Joint for Z i have the problem that the difference to zero position is quite high as the position change might be 100 mm

so here i'm at a point  where i don't figure out what to do, and either where to find out or whom to ask for help.

what i currently try to do is 
Joint_num].index_enable = index_search_active;  at the PK_PEAxisState_axReadyToArmEncoder status


and at the follwoing status
PK_PEAxisState_axHOMINGARMENCODER  i basically reuse the actions as were done in homing.c at "HOME_INDEX_SEARCH_WAIT"

                if (H[joint_num].index_enable == index_search_armed) {
                    /* yes, stop motion */
                    joint->free_tp.enable = 0;

                    // joint->free_tp.pos_cmd = joint->free_tp.curr_pos; // set to zero
                    joint->free_tp.pos_cmd = 0; // set to zero

                    /* Pokeys resets encoder position to zeros */
                    H[joint_num].index_enable = index_search_armed;

                    H[joint_num].homing = 1;
                    H[joint_num].home_state = HOME_SET_INDEX_POSITION;
                }


but it always stops at about that step and some part triggers "do_cancel_homing"
the only message that i could see on my last version was 
"emc/task/taskintf.cc 976: Error on joint 3, command number 139"

(until now a similar message was together with a FOLLOWING_ERROR for that joint)

Is there someone who could tell me where to check, or whom to ask. I'm not sure if this thread is the right place to ask about that topic.

BR
Dominik

Please Log in or Create an account to join the conversation.

Time to create page: 0.242 seconds
Powered by Kunena Forum