HURCO KMB-1 Control Update

More
1 year 7 months ago - 1 year 7 months ago #323279 by PCW
Replied by PCW on topic HURCO KMB-1 Control Update
Your hal file shows a software encoder rather than the 7I73's encoder,
A software encoder sampled at the servo thread rate will limit you to less than
1000 counts per second. You would need to use the 7I73s encoder counter to go
faster. From the 7I73 manual:

"The 7I73 can track encoder inputs up to a 50 KHz maximum count rate (4X modes).
Maximum count rate is 12.5 KHz in 1X modes and 25 KHz in 2X modes. These maximum
count rates will be reduced by quadrature distortion (deviation from 90 degree phase
difference between A and B ) so practical maximum count rates are normally somewhat
lower.
Last edit: 1 year 7 months ago by PCW.

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

More
1 year 7 months ago - 1 year 7 months ago #323300 by NT4Boy
Replied by NT4Boy on topic HURCO KMB-1 Control Update
Oh dear..My poor old brain.
So, the MPG is connected to the correct pins, but the input designation I should be using is perhaps hm2_7i92.0.7i73.0.2.enc0.count to get access to the high speed values?

So take the encoder count stuff out of the hal thread and instead couple
net mpg-out ilowpass.0.in <= hm2_7i92.0.7i73.0.2.enc0.count
Last edit: 1 year 7 months ago by NT4Boy.

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

More
1 year 7 months ago #323301 by PCW
Replied by PCW on topic HURCO KMB-1 Control Update
Yes, you don't need the hal encoder comp at all and unless you have a base thread
(not practical with an Ethernet connected device), the hal component will be quite slow.
The following user(s) said Thank You: NT4Boy

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

More
1 year 7 months ago - 1 year 7 months ago #323810 by NT4Boy
Replied by NT4Boy on topic HURCO KMB-1 Control Update
Jogging all good now, so paying attention to getting the variable resistor potentiometers to control feedrate and spindle speed overrides.
This was complicated by the fact the Hurco has these pots internally fed with 5 volts, and I am reading the analogue voltage via 7i73 pins that tolerate 3.3volts max. However, addressed that with a resistor bridge. Then I want for the pot controls to also change the gui sliders on the Axis screen.
The attached postgui hal makes that all work, and by adjusting the scale figure can get the mid positions to align with 100%, near enough.
To get that right I have been stopping and starting the Axis gui, over and over without homing the machine and find that this "unrecognised error" message crops up sometimes, freezing the rate sliders. The Gui can stiil be shut down normally using the top right X , and generally on a restart, it works again but would like to know what the cause is.
Thanks
I have never seen this error before until I used the mult2 function in this hal.

File Attachment:

File Name: feed_or.hal
File Size:1.76 KB
Last edit: 1 year 7 months ago by NT4Boy.

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

More
1 year 7 months ago - 1 year 7 months ago #323955 by NT4Boy
Replied by NT4Boy on topic HURCO KMB-1 Control Update
Delving into this in more detail, the AtoD conversion doesn't look very stable.
My digital voltmeter reads on a nominal mid position of XY feed pot a steady, non varying 1.666v
the 7i73 analog0 numbers flicker, not regularly, like on a timer, but with a fast random up and down.. With a slow-mo video
I actually get readings 1.565882,1.578824, 1.591756 the differences are exactly one bit. (3.3volts, 255 bits, ie 0.012941 volts per bit)
When the servos are on, then this flicker is actually audible.
Can you suggest anything that I can do to improve this please?
Thanks
Last edit: 1 year 7 months ago by NT4Boy.

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

More
1 year 7 months ago #323970 by PCW
Replied by PCW on topic HURCO KMB-1 Control Update
You can low pass filter the outputs
Also for noise and stability I would

1. Run the pots from the 7I73s 3.3V if you can
(Since this is the 7I73s analog input reference the reading
will be ratiometric, so a change in the 3.3V will not change the reading)

2. Low pass filter the inputs at the 7I73 (say with a 0.1 uF capacitor to 7I73 ground)

3. Low pass filter the analog hal signal (a 1 LSB  dither is expected with almost any
A-D at least at some (halfway between) input levels)

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

Time to create page: 0.073 seconds
Powered by Kunena Forum