Need help in choosing controller board from small honby cnc.

More
02 Jun 2024 11:16 #302138 by amanker
Few Things
Base Thread was available after I added entry in [EMCMOT] base_period 0 to 50000. in ini file.

That didnt changed the response scale and axis selector switch its still delayed by 20-30 secs. only selector switch signals are delayed. Not the encoder signals.

I have defined remora.PV.0 and verified recoder is counting. hall meter shows inc/dec integers.

couldnt figureout how to use conv_float_s32 thing

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

More
02 Jun 2024 11:44 #302139 by amanker
New MPG HAL file with working PRUencoder
# Jog Pendant
loadrt PRUencoder names=encoder.0
addf PRUencoder.capture-position servo-thread
#addf PRUencoder.update-counters base-thread
setp encoder.0.position-scale 1200.0
# connect the hal encoder to linuxcnc
net encoder-count <= remora.PV.0 => encoder.0.raw_count
loadrt conv_float_s32 count=1
addf conv-float-s32.0 servo-thread

loadrt mux4 count=1
#addf encoder.capture-position servo-thread
#addf PRUencoder.update-counters base-thread
addf mux4.0 servo-thread

# If your MPG outputs a quadrature signal per click set x4 to 1
# If your MPG puts out 1 pulse per click set x4 to 0
#setp encoder.0.x4-mode 0

# For velocity mode, set to 1
# In velocity mode the axis stops when the dial is stopped
# even if that means the commanded motion is not completed,
# For position mode (the default), set to 0
# In position mode the axis will move exactly jog-scale
# units for each count, regardless of how long that might take,
setp joint.0.jog-vel-mode 1
setp joint.1.jog-vel-mode 1
setp joint.2.jog-vel-mode 1

# This sets the scale that will be used based on the input to the mux4
setp mux4.0.in0 0.1
setp mux4.0.in1 0.01
setp mux4.0.in2 0.001

# The inputs to the mux4 component
net scale1 mux4.0.sel0 <= remora.input.9
net scale2 mux4.0.sel1 <= remora.input.10

# The output from the mux4 is sent to each axis jog scale
net mpg-scale <= mux4.0.out
net mpg-scale => joint.0.jog-scale
net mpg-scale => joint.1.jog-scale
net mpg-scale => joint.2.jog-scale
#net mpg-scale => axis.a.jog-scale
#net mpg-scale => axis.c.jog-scale

# The MPG inputs
#net mpg-a encoder.0.phase-A <= remora.input.7
#net mpg-b encoder.0.phase-B <= remora.input.8

# The Axis select inputs
net mpg-x joint.0.jog-enable <= remora.input.11
net mpg-y joint.1.jog-enable <= remora.input.12
net mpg-z joint.2.jog-enable <= remora.input.13
#net mpg-a axis.a.jog-enable <= remora.input.14
#net mpg-c axis.c.jog-enable <= remora.input.15

# The encoder output counts to the axis. Only the selected axis will move.
net encoder-count   conv-float-s32.0.in
net encoder-counts  conv-float-s32.0.out


#net encoder-counts  <= encoder.0.counts
net encoder-counts => joint.0.jog-counts
net encoder-counts => joint.1.jog-counts
net encoder-counts => joint.2.jog-counts
#net encoder-counts => axis.c.jog-counts

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

More
02 Jun 2024 11:53 #302140 by amanker
Attachments:

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

More
02 Jun 2024 14:44 #302158 by amanker
Yes my setup is really unusual. Because most pf the users are professional users and they go for readymade and no fuss solutions.

My little hobby cnc more unusual than this. For making that work I had to churnout my brain so much. Its XYZAB configuration. Its my custom design. It has A Rotary as in usual 4 axis machines. And it has B rotary head. So spindle rotate in B axis. Most common config is XYZAC/BC. I searched net so much but didn't find a single machine or example like my setup. Till now I was using GRBL and made custom post processor for this for simultaneous 5 axis machining.
If you are interested in seeing my setup.
Here is link.
www.reddit.com/r/hobbycnc/s/xX7GVXm72c

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

More
02 Jun 2024 16:59 #302178 by cakeslob
that looks awesome, good stuff!


can you give me some more detail on the estop? is it not turning on or not turning off?

The other things worked?

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

More
02 Jun 2024 18:32 #302185 by amanker
What looks awesome? My little machine or my test setup?
Really problem will be creating kinamatics for my machine. I couldn't find any similar example.

About Estop. Hardware button does nothing. It doesn't matter its pressed or not.
I have to use gui estop and machine enable.

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

More
02 Jun 2024 20:53 #302196 by cakeslob
lol i mean the machine,
but yeah the kins will be the hard part, but if you check out the advanced configuration section someone can help you

hmm ok the estop thing looks like a syntax issue, copy mine exactly
{  
"Thread": "Servo",
    "Type": "eStop",
            "Comment":                      "estop pin",
            "Pin":                          "PF_3"
   	 },

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

More
03 Jun 2024 06:13 - 03 Jun 2024 15:08 #302225 by amanker
I think you have missed my last few post. I have posted every detail including all config files. Also asked some questions. Lastly I sent hal file for working PRUencoder. But still there is problem of delay in selector switches of axis and scale selection. And delay is 20-30secs. which is quite large enough.

Update 1:-
1. eStop working now. I have defined pin type "eStop Pin" instead of "eStop". So using type "eStop" fixed this. Is there any way I can toggle estop and machine on GUI using hardware buttons?
2. Removed base thread configs. Now I can reach speed of 1500mm/sec.
3. Still issue really slow switching of axis selector and scale selector switch. Please have a look at my configs, You might notice something. How to descide value of "setp encoder.0.position-scale 400.0"? encoder pins are working in wrong direction. I will exchange pin positions.

Update 2:-
Changing PRU_Freq to 80000 increased feed to 1500mm/sec approx.
Changing PRU_Freq to 120000 increased feed to 2200mm/sec approx.

Update 3:-
Problem of slow switching of axis selector and scale selector switch is due to I am using EXP1 pins, I have re arranged the pin connections and solved the issue of axis selection delay, But now I have to figure out suitable pins for scale selector.

Update 4:-
Found that jogging from MPG pendant is not working after Homing.
Solution.. Only joints were defined and enabled in config. After homing axis should enabled and used.
Now working after Homing.
Last edit: 03 Jun 2024 15:08 by amanker.

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

More
04 Jun 2024 00:41 - 04 Jun 2024 01:02 #302284 by cakeslob
sorry, it is hard to keep track of everything

""setp encoder.0.position-scale 400.0""
yes, sorry i forgot its quad, you are right to put 1200 like in your file

lets make a list then

estop = good?
encoder = good?
PRU_freq 120000 = good?
jog scale = slow

im not sure why you are getting a delay. I use the pins on exp1 for my encoder/limit switch stuff usually, and i havent seen a delay before.

i cannot run qtdragon on my machine, so I only copied over mpg hal. I am not seeing any delay in the IO or on the mux. Where are you seeing a delay? For the qtdragon gui to change ? When I use halshow, they are responding instantly

start by doing this


#USER_COMMAND_FILE = usercommand_regularmac_800.py
BASE_PERIOD = 0
 
Last edit: 04 Jun 2024 01:02 by cakeslob.

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

More
04 Jun 2024 04:58 - 04 Jun 2024 07:02 #302293 by amanker
I have explained everything in last post. With update list.

1. Estop working. (Made mistake of defining as "estop pin")
2. Encoder Working. ( Used conv_float_s32 function)
3. PRU_Frequency = 12000. Working good with speed of upto 2400mm/min.
4. Jog scale slow. Its about jog and axis selector switch. ( I found its a problem of board pin compatibility issue. May be those pins of EXP1 has some interference and not suitable for inputs) So I changed to inputs to elsewhere and problem resolved. Pins of EXP1 was giving problem. I tried pins of BL_touch. That also had delay in input switching. So I changed location of pins and issue resolved.

Problem... ""setp encoder.0.position-scale 400.0"" if I change this value to anything else then also it changes nothing. Per click of encoder value is always same. I tried 100-2400 value.

If you have some time please have look at my previous post with updates.

I have attached PIC of new pin location. 
Attachments:
Last edit: 04 Jun 2024 07:02 by amanker.

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

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