Why won't it jog

More
09 Jul 2023 04:20 #275056 by beefy
Why won't it jog was created by beefy
Using a Qtplasmac config with a 7i96 board with hal file generated by PncConfig

I've hooked up a microcontroller programmed as an encoder emulator, to the 7i96 board.
All this encoder emulator board does is give out A & B quadrature signals at different frequencies (to give different jog speeds).
The only other extra signals I have are from a 3 way selector switch to select either X, Y or Z jog-enable.
The 7i96 is flashed with the 7i96_p1inmd.bit file which gives extra encoder reader inputs on the P1 expansion port.

Wrote a very basic custom hal file - no ilowpass, etc, just the bare bones for testing.
The code is:

net    encoder-counts    <=   hm2_7i96.0.inm.00.enc0-count
net    encoder-counts    =>   axis.x.jog-counts    joint.0.jog-counts
net    encoder-counts    =>   axis.y.jog-counts    joint.1.jog-counts
net    encoder-counts    =>   axis.z.jog-counts    joint.2.jog-counts

net    jog-enable-X    hm2_7i96.0.inm.00.input-02-not     =>    axis.x.jog-enable     joint.0.jog-enable
net    jog-enable-Y    hm2_7i96.0.inm.00.input-03-not     =>    axis.y.jog-enable     joint.1.jog-enable
net    jog-enable-Z    hm2_7i96.0.inm.00.input-04-not     =>    axis.z.jog-enable     joint.2.jog-enable

I used Halshow to see the encoder value increase and decrease with FWD and REV directions. 
Likewise all jog count pins for X,Y,Z axis and 0,1,2 joints incremented / decremented together with the encoder count value, so all seems to work perfect there.

Likewise the X, Y, Z jog-enable and 0, 1, 2 joint jog-enable pins activate with the corresponding selector switch positions.

So I have one of the jog-enable signals active and the encoder counts working.
Why does the axis not respond, am I missing something in the hal file.

Qtplasmac config backup file attached.

 
 
 

File Attachment:

File Name: BEEFYS_PLA...6.tar.gz
File Size:17 KB
Attachments:

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

More
09 Jul 2023 04:30 #275058 by phillc54
Replied by phillc54 on topic Why won't it jog
Are axis.N.jog-scale and joint.N.jog-scale being set to the correct value?
 

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

More
09 Jul 2023 04:44 - 09 Jul 2023 04:48 #275059 by beefy
Replied by beefy on topic Why won't it jog
That's interesting Phill.

Are you saying I MUST include them in the hal file and give them a value ??  i.e. jog-scale does not default to a value if it's not in the hal file.

Saying that I just looked in the docs and there's no mention of any default.
Last edit: 09 Jul 2023 04:48 by beefy.

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

More
09 Jul 2023 04:47 #275060 by phillc54
Replied by phillc54 on topic Why won't it jog
Yes, that is the distance moved each count.

The axes ones are in the hal file but I am not sure what it is that they are connected to.
 

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

More
09 Jul 2023 04:50 - 09 Jul 2023 04:58 #275061 by beefy
Replied by beefy on topic Why won't it jog
OK that's an easy thing to try.

Cheers Phill.

EDIT:
Well what do you know, I'm a dick. I actually looked back in my comments for the C coding in the microcontroller and there's me mentioning about setting a scale of 0.1 for the jog speed calculations (based on quadrature pulse rates), yet I forget all about that LOL. 
Last edit: 09 Jul 2023 04:58 by beefy.

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

More
09 Jul 2023 05:41 - 09 Jul 2023 05:42 #275062 by beefy
Replied by beefy on topic Why won't it jog
Phill, I love you.

Couldn't find any jog-scale stuff in the hal files but I just stuck the following in my custom hal file regardless:

net     jog-scale     axis.x.jog-scale     joint.0.jog-scale
net     jog-scale     axis.y.jog-scale     joint.1.jog-scale
net     jog-scale     axis.z.jog-scale     joint.2.jog-scale

sets   jog-scale   0.1

and voila, everything worked perfectly. All axis, all jog speed settings, exactly as I'd programmed the microcontroller to do it. I'm over the moon.

Thanks Phill.
Last edit: 09 Jul 2023 05:42 by beefy.

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

Moderators: snowgoer540
Time to create page: 0.224 seconds
Powered by Kunena Forum