RPI4 +7c81

More
10 May 2022 21:38 #242528 by drummond
RPI4 +7c81 was created by drummond
 I'm replacing a parport driven setup which died with the above.  Everything has gone OK so far except I can't get any motion out of the steppers, I know the 7c81 is communicating withe the g540 OK because the drive locks the steppers as soon as the virtual estop comes off.  Starting up from a terminal doesn't show any obvious errors.I think I have made a mistake somewhere , and maybe my eye keeps skating over it?  The only important parallel port pins were: 2-7 and 16.  I'll attach a couple of files  the mill used to be called "Monster_Mill" when it was parallel port, the new config is called "millie".
Here are the results of doing a mesaflash read (I've cut out anything but P1 to save space):
IO Connections for P1+Serial
Pin#  I/O   Pri. func    Sec. func       Chan      Pin func        Pin Dir

 0      0   IOPort       None           
 0      1   IOPort       PWM              0        PWM             (Out)
 0      2   IOPort       StepGen          0        Step/Table1     (Out)
 0      3   IOPort       None           
 0      4   IOPort       StepGen          0        Dir/Table2      (Out)
 0      5   IOPort       StepGen          4        Step/Table1     (Out)
 0      6   IOPort       StepGen          1        Step/Table1     (Out)
 0      7   IOPort       None           
 0      8   IOPort       StepGen          1        Dir/Table2      (Out)
 0      9   IOPort       StepGen          2        Step/Table1     (Out)
 0     10   IOPort       StepGen          2        Dir/Table2      (Out)
 0     11   IOPort       StepGen          3        Step/Table1     (Out)
 0     12   IOPort       StepGen          3        Dir/Table2      (Out)
 0     13   IOPort       QCount           0        Quad-A          (In)
 0     14   IOPort       QCount           0        Quad-B          (In)
 0     15   IOPort       QCount           0        Quad-IDX        (In)
 0     16   IOPort       None           
 0     17   IOPort       SSerial          0        TXData0         (Out)
 0     18   IOPort       SSerial          0        TXData1         (Out)

Here is the results through the lens of HAL:
halcmd: loadrt hm2_rpspi
hm2/hm2_7c81.0: Low Level init 0.15
hm2/hm2_7c81.0: Smart Serial Firmware Version 43
hm2/hm2_7c81.0: 57 I/O Pins used:
hm2/hm2_7c81.0:     IO Pin 000 (P1-01): IOPort
hm2/hm2_7c81.0:     IO Pin 001 (P1-02): PWMGen #0, pin Out0 (PWM or Up) (Output)
hm2/hm2_7c81.0:     IO Pin 002 (P1-03): StepGen #0, pin Step (Output)
hm2/hm2_7c81.0:     IO Pin 003 (P1-04): IOPort
hm2/hm2_7c81.0:     IO Pin 004 (P1-05): StepGen #0, pin Direction (Output)
hm2/hm2_7c81.0:     IO Pin 005 (P1-06): StepGen #4, pin Step (Output)
hm2/hm2_7c81.0:     IO Pin 006 (P1-07): StepGen #1, pin Step (Output)
hm2/hm2_7c81.0:     IO Pin 007 (P1-08): IOPort
hm2/hm2_7c81.0:     IO Pin 008 (P1-09): StepGen #1, pin Direction (Output)
hm2/hm2_7c81.0:     IO Pin 009 (P1-11): StepGen #2, pin Step (Output)
hm2/hm2_7c81.0:     IO Pin 010 (P1-13): StepGen #2, pin Direction (Output)
hm2/hm2_7c81.0:     IO Pin 011 (P1-15): StepGen #3, pin Step (Output)
hm2/hm2_7c81.0:     IO Pin 012 (P1-17): StepGen #3, pin Direction (Output)
hm2/hm2_7c81.0:     IO Pin 013 (P1-19): Encoder #0, pin A (Input)
hm2/hm2_7c81.0:     IO Pin 014 (P1-21): Encoder #0, pin B (Input)
hm2/hm2_7c81.0:     IO Pin 015 (P1-23): Encoder #0, pin Index (Input)
hm2/hm2_7c81.0:     IO Pin 016 (P1-25): IOPort
hm2/hm2_7c81.0:     IO Pin 017 (J5-TX0): IOPort
hm2/hm2_7c81.0:     IO Pin 018 (J6-TX1): IOPort 

If anyone spots some howlers, or has any helpful suggestions, I am all ears.

Thanks for reading

 
Attachments:

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

More
12 May 2022 22:01 #242820 by drummond
Replied by drummond on topic RPI4 +7c81
I tested the 26 pin to DB25 cable for continuity, it wasn't as easy as it might have been because both ends are female, no problems there. Ran pncconfig for the umpteenth time and noticed it had a place to select g540 setting for step timings, turned that into a dummy so that I could see what ini  and HAL got produced (since the same thing in stepconf isn't awfully helpful).    Decided to try those settings on the X axis, because what do I have to lose?

Lo and behold X started moving,  repeated the process with Y and that was off to the races.  I thought Z would be  a shoe in after that, but nope still nothing doing.  Z is definitely on DB pin 6 for step and 7 for direction, which if I read the manual correctly should be IDC pins 11&13.  Running from a terminal I can see the jog events and key ups too, but no physical action from Z.

The parameters I used to get  2 out of 3 axis moving were: step on time: 5000, step space 5000, direction hold 10000, direction setup 10000

Now, What's the issue with the Z axis?


 

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

More
12 May 2022 23:44 #242829 by tommylight
Replied by tommylight on topic RPI4 +7c81
Hard to tell from here, but uploading the working config files here might help figuring out.

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

More
13 May 2022 22:50 #242917 by drummond
Replied by drummond on topic RPI4 +7c81
I *think* I have the issue fixed pending testing.  So where was the problem?  I'm including a HAL file called millie_wrong which highlights my mistake:

under #AXIS Z JOINT 2 you will note the unforced error:


setp   [HMOT](CARD0).stepgen.03.dirsetup        [JOINT_2]DIRSETUP etc.

All to do with my way of coping with the pncconf information along with this:
  
www.mesanet.com/pdf/parallel/7c81man.pdf

to translate from idc26 to DB25; so jump down 2 GPIO to pin 3 for Xstep jump the next space to pin 5 for X direction next pin is charge pump (idc pin 6, DB25 pin 16) right after is pin 7 which is Ystep 8 is unused, 9 is Y direction so we have to hop a pin to 11 for Zstep and hop another pin for Z direction *done* Nope, that's what produced millie_wrong.

The problem with that is that idc pins 10 and 12 do not exist, well they do physically exist but 10 leads to db pin 18 and 12 leads to 19 both of which are grounds rather than signal pins, therfore thay don't appear in the interface. Pin 11 is right next to pin 9 and there is no space between 11 and 13.

Once I thought about it that way I put the Zaxis step and direction pins right next to each other and right after Y direction <sigh> now Z works and I know just which pins to use for the rotary table (that I might have one day).

Corrected HAL file produced entitled millie also included
Attachments:
The following user(s) said Thank You: tommylight

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

Moderators: PCWjmelson
Time to create page: 0.281 seconds
Powered by Kunena Forum