difference between 2.7 and 2.8pre with mpg

More
10 Sep 2018 10:21 #117285 by Clive S
The code below works in Lcnc V. 2.7.14 but I can't seem to get it working in 2.8pre.

I see in halmeter all the relevant pins changing state. ie encoder.2---- counts, phase-A, velocity etc.. but it does not jog with the mpg in Z
I have noticed that the pin axis.z.pos-cmd changes with the keyboard jog key but not with the mpg. What I am missing?


# MPG stuff here
#### load ilowpass for mpg smoothing ###

loadrt ilowpass names=ilowpass.mpgX,ilowpass.mpgY,ilowpass.mpgZ

addf ilowpass.mpgZ servo-thread
setp ilowpass.mpgZ.scale 1
setp ilowpass.mpgZ.gain 0.1

setp axis.2.jog-vel-mode 1


#set axis to the required increment ( 0.01)
net jog-inc-z axis.2.jog-scale
sets jog-inc-z 0.01

#encoder Z
net mpg-za encoder.2.phase-A <= hm2_7i92.0.gpio.032.in
net mpg-zb encoder.2.phase-B <= hm2_7i92.0.gpio.033.in

# send mpg-encoder counts to required axis

# Z encoder
net pend-counts-z axis.2.jog-counts
net pend-counts-z ilowpass.mpgZ.in

net encoder-count-z ilowpass.mpgZ.out
net pend-counts-z encoder.2.counts

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

More
10 Sep 2018 13:26 #117288 by PCW
One missing thing is axis.z.jog-enable
also at least according to my motion man page:
net pend-counts-z axis.2.jog-counts
should be
net pend-counts-z axis.Z.jog-counts
Also the low pass filter is bypassed, not sure if that's just for debugging

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

More
10 Sep 2018 16:05 #117295 by Clive S

One missing thing is axis.z.jog-enable
also at least according to my motion man page:
net pend-counts-z axis.2.jog-counts
should be
net pend-counts-z axis.Z.jog-counts
Also the low pass filter is bypassed, not sure if that's just for debugging

Thanks for the help yet again Peter:
#encoder Z
net mpg-za encoder.2.phase-A <= hm2_7i92.0.gpio.025.in
net mpg-zb encoder.2.phase-B <= hm2_7i92.0.gpio.026.in

# Z encoder
net pend-counts-z encoder.2.counts
net pend-counts-z ilowpass.mpgZ.in

#net encoder-count-z ilowpass.mpgZ.out
net pend-z ilowpass.mpgZ.out
net pend-z axis.z.jog-counts

setp axis.z.jog-enable true

I see all the above pins and signals change in halmeter but not reflected in the DRO Z (no movement)

I can't see where I am going wrong. I have cut the ilowpass out for now

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

More
10 Sep 2018 16:30 #117297 by PCW
Has the system been homed when you are trying to jog?
The following user(s) said Thank You: Clive S

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

More
10 Sep 2018 16:49 #117299 by Clive S

Has the system been homed when you are trying to jog?


Thanks that was it. What fooled me was that it would jog with the keyboard so I expected it to do the same with the mpg.

Now I just need to sort the ilowpass out.

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

More
10 Sep 2018 17:06 #117300 by PCW
Yes 2.8 is in joint mode before homing (the GUI must know this so jogs via the joint pins with the KB)
The following user(s) said Thank You: Clive S

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

More
10 Sep 2018 17:55 #117304 by Clive S

Yes 2.8 is in joint mode before homing (the GUI must know this so jogs via the joint pins with the KB)


Yes I should have known. If you have the time could you look over the ilowpass for me.

File Attachment:

File Name: mpgz_2018-09-10-2.txt
File Size:2 KB
Attachments:

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

More
11 Sep 2018 14:40 #117337 by andypugh
In 2.8 you probably want to connect the mpg to both
axis.L.jog-counts
_and_
joint.N.jog-counts

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

More
11 Sep 2018 15:26 #117347 by Clive S

In 2.8 you probably want to connect the mpg to both
axis.L.jog-counts
_and_
joint.N.jog-counts

It appears to work as is on the bench . Do you mean like this:-

# x encoder
net pend-counts-x encoder.0.counts
net pend-counts-x ilowpass.mpgX.in

net pend-x ilowpass.mpgX.out
net pend-x axis.x.jog-counts
net pend-x joint.x.jog-counts

setp axis.x.jog-enable true

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

More
12 Sep 2018 13:13 #117393 by andypugh
You need both if you want to be able to jog before homing.

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

Time to create page: 0.176 seconds
Powered by Kunena Forum