New ethercat / probe basic control for minimonster

More
1 year 2 days ago - 1 year 2 days ago #337434 by ihavenofish
aha!
looked at that add in card and realised something. it is an int with multiple settings (start, reverse stop, etc). but when the pin initialises it writes a 0, which is not allowed.

so i ignore that and in halshow make it 1 and it turns on. and 6 turns it off.
So now that all makes sense!

The next thing i see is frequency is not 2001, its 1000 (4096 in decimal).

So a quick test of that and we get... motion!

(except its going reverse which is a setting i can change)

woooohooooo

so now, we need a hal and then a spindle section in the ini? because i am using ethercat from scratch here, i have literally no other functions in my main HAL or INI.

What should i be expecting to add there?

Thanks!
Last edit: 1 year 2 days ago by ihavenofish.

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

More
1 year 2 days ago #337438 by ihavenofish
Should add that the frequency seems to be a percent x 100. so setting it to 100 gives me 13.33 hz which is 1% of full speed.

Gonna need to work that into my math. :)

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

More
1 year 2 days ago #337448 by Hakan
Here are the general signals that was generated for me by pncconf some years ago.
Code:
net spindle-vel-cmd-rps        <=  spindle.0.speed-out-rps net spindle-vel-cmd-rps-abs    <=  spindle.0.speed-out-rps-abs net spindle-vel-cmd-rpm        <=  spindle.0.speed-out net spindle-vel-cmd-rpm-abs    <=  spindle.0.speed-out-abs net spindle-enable             <=  spindle.0.on net spindle-cw                 <=  spindle.0.forward net spindle-ccw                <=  spindle.0.reverse net spindle-brake              <=  spindle.0.brake net spindle-revs               =>  spindle.0.revs  net spindle-at-speed           =>  spindle.0.at-speed setp spindle.0.at-speed 1 net spindle-vel-fb-rps         =>  spindle.0.speed-in net spindle-index-enable      <=>  spindle.0.index-enable net spindle-revs              <=   hm2_7i76e.0.encoder.04.position net spindle-vel-fb-rps        <=   hm2_7i76e.0.encoder.04.velocity net spindle-index-enable      <=>  hm2_7i76e.0.encoder.04.index-enable net spindle-manual-cw     halui.spindle.0.forward net spindle-manual-ccw    halui.spindle.0.reverse net spindle-manual-stop   halui.spindle.0.stop
You would need at least the enable and one of the vel-cmds.
Maybe forward/reverse and so on.
They all connect to the spindle pins (created by the motmod component).
Speed feedback is optional but nice to have, at-speed if your spindle can do that.
 

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

More
1 year 2 days ago #337453 by ihavenofish
ooh, thanks

ill look at this when i wake up. im burned out from trying to make chatgpt give me something useful haha

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

More
1 year 2 days ago #337456 by ihavenofish
just for kicks, chat gpt has sent me down several roads that i know are wrong.

1st it tried to use motion component, but it has no spindle pins defined.(i expect these need to be set up in the main ini or hal but it couldnt tell me

so this in said i could use the spindle components... and then realised its read only.

then it took to just fabricating pins and functions that dont exist.

sigh. and this is what we have trying to run out law enforcement cameras? mmmmm good times.

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

More
1 year 2 days ago #337464 by ihavenofish
Still poking cause this is bugging me. Instead of telling chatgpt to make me code, instead I asked it why it's broken.

What it tells me is that motion.spindle basically doesn't work with modbus directly and pins wont be created and there's no simple automagic way to have m commands work out of the box.

It says this is a limitation of axis (what I have it running while I'm testing) and QT dragon doesn't have this limitation.

Before I follow it down another hole, does this sound like its correct? I want qtdragon anyway, it just was not installed because I did this all from scratch.

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

Time to create page: 0.090 seconds
Powered by Kunena Forum