7c80 install on rpi 4

More
14 Dec 2020 01:59 #191932 by PCW
Replied by PCW on topic 7c80 install on rpi 4
man hostmot2
and
halcmd show all hm2
The following user(s) said Thank You: rdtsc

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

More
28 Jul 2021 15:38 #216128 by Borsti
Replied by Borsti on topic 7c80 install on rpi 4
Hi there,
       I decided to open the older post in favor of creating a new one on the same topic as 7C80 & RPI4 as the info is scare for that kind of configuration.

I'm retro-fitting currently a small table carving machine and decided to use RPI4 along with 7C80 due to space, but I'm running into issues with the configuration of PNCCONF as the board is not available and I have no idea how to do it, so I followed the previous posts from  jimhurlburt  and used the 7i76 as template, but how should I change the *.hal to reflect the I/O?
I understood that the syntax for:
  • Input is: hm2_7c80.0.inmux.00.input-00
                 hm2_7c80.0.inmux.00.input-00-not
  • Analog should be for Output the syntax - hm2_7c80.0.inmux.00.output-00 ?
  • How about the spindle output?
Thanks a lot for the help and if someone has a functional *.hal I would be very appreciated if I could get a copy for reference.
 

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

More
28 Jul 2021 16:24 #216131 by PCW
Replied by PCW on topic 7c80 install on rpi 4
Spindle analog is controlled by PWMgen 0
The isolated outputs are SSRs (same hal names as 7I96)
Spindle ENA/FWD is GPIO20, Spindle DIR/REV is GPIO21
Both active low.

halcmd show pin hm2 will show all the hardware pins
halcmd show param hm2 will show all the hardware parameters

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

More
28 Jul 2021 16:49 #216136 by Borsti
Replied by Borsti on topic 7c80 install on rpi 4
Thanks for the quick replay - I will check and post later as I have some other task open from my day job ;)

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

More
29 Jul 2021 17:33 #216243 by jimhurlburt
Replied by jimhurlburt on topic 7c80 install on rpi 4
Sir:
Sorry for the delay, I saw the post, wasn't convenient to deal with it right then, then forgot later

Attached are my HAL and ini files.  The ini file is specific to my hardware, but may give you something useful to work with.  The hal file is what I am using to run my machine.  At the moment I don't have a controlable spindle, but the movement works well.

I do have two parallel steppers running the y axis, so you may need to adjust that bit.

If you have questions I will try to take note and monitor this thread for a few days.

Jim
Attachments:
The following user(s) said Thank You: rdtsc

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

More
29 Jul 2021 18:17 - 21 Jan 2022 23:32 #216247 by PCW
Replied by PCW on topic 7c80 install on rpi 4
This should be close to a working spindle section of a 7C80 hal file:


#*******************
#  SPINDLE
#*******************

setp   pid.s.Pgain     [SPINDLE_0]P
setp   pid.s.Igain     [SPINDLE_0]I
setp   pid.s.Dgain     [SPINDLE_0]D
setp   pid.s.bias      [SPINDLE_0]BIAS
setp   pid.s.FF0       [SPINDLE_0]FF0
setp   pid.s.FF1       [SPINDLE_0]FF1
setp   pid.s.FF2       [SPINDLE_0]FF2
setp   pid.s.deadband  [SPINDLE_0]DEADBAND
setp   pid.s.maxoutput [SPINDLE_0]MAX_OUTPUT
setp   pid.s.error-previous-target true

net spindle-index-enable  <=> pid.s.index-enable
net spindle-enable        =>  pid.s.enable
net spindle-vel-cmd-rpm-abs     => pid.s.command
net spindle-vel-fb-rpm      => pid.s.feedback
net spindle-output        <=  pid.s.output

# ---PWM Generator signals/setup---

setp   [HMOT](CARD0).pwmgen.00.output-type 1
setp   [HMOT](CARD0).pwmgen.00.scale  [SPINDLE_0]OUTPUT_SCALE
setp   [HMOT](CARD0).pwmgen.pwm_frequency 5000
setp   [HMOT](CARD0).pwmgen.00.out0.invert_output true

# --- Setup 7C80 GPIO bits for FWD/REV spindle control
setp [HMOT](CARD0).gpio.020.invert_output true
setp [HMOT](CARD0).gpio.020.is_output true
setp [HMOT](CARD0).gpio.021.invert_output true
setp [HMOT](CARD0).gpio.021.is_output true

net spindle-cw  => [HMOT](CARD0).gpio.020.out
net spindle-ccw => [HMOT](CARD0).gpio.021.out

net spindle-output      => [HMOT](CARD0).pwmgen.00.value
net spindle-enable      => [HMOT](CARD0).pwmgen.00.enable

# ---Encoder feedback signals/setup---

setp    [HMOT](CARD0).encoder.00.counter-mode 0
setp    [HMOT](CARD0).encoder.00.filter 1
setp    [HMOT](CARD0).encoder.00.index-invert 0
setp    [HMOT](CARD0).encoder.00.index-mask 0
setp    [HMOT](CARD0).encoder.00.index-mask-invert 0
setp    [HMOT](CARD0).encoder.00.scale  [SPINDLE_0]ENCODER_SCALE

net spindle-revs             <=   [HMOT](CARD0).encoder.00.position
net spindle-vel-fb-rps       <=   [HMOT](CARD0).encoder.00.velocity
net spindle-vel-fb-rpm       <=   [HMOT](CARD0).encoder.00.velocity-rpm
net spindle-index-enable     <=>  [HMOT](CARD0).encoder.00.index-enable

# ---setup spindle control signals---

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
net spindle-vel-fb-rps         =>  spindle.0.speed-in
net spindle-index-enable      <=>  spindle.0.index-enable

# ---Setup spindle at speed signals---

sets spindle-at-speed true

**********************************************************************************

And the INI file spindle boilerplate:

[SPINDLE_0]
P = 0.0
I = 0.0
D = 0.0
FF0 = 1.0
FF1 = 0.0
FF2 = 0.0
BIAS = 0.0
DEADBAND = 0.0
MAX_OUTPUT = 2000.0
ENCODER_SCALE = 1024.0
OUTPUT_SCALE = 2000
OUTPUT_MIN_LIMIT = -2000
OUTPUT_MAX_LIMIT = 2000

 
Last edit: 21 Jan 2022 23:32 by PCW. Reason: missing PWM setup parameters and ABS for spindle speed
The following user(s) said Thank You: andypugh, rdtsc

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

More
13 Aug 2021 18:37 #217698 by Borsti
Replied by Borsti on topic 7c80 install on rpi 4
Hi there   !!!

Thanks a lot for the many valuable replays and finally after some days of testing my machine is homing !!!!!
Well, I need now to make sure the spindle runs and the E-Stops working etc..
I still would need some hint in regards to the outputs

# --- MACHINE-IS-ENABLED ---
net machine-is-enabled  =>   hm2_7c80.0.led.CR01 => hm2_7c80.0.gpio.012.out

This one is switching the LED and in HAL-Monitor as well the output but physically I don't have anything in Output 0

... or I just lost myself ?

Thanks for some hints!
 

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

More
13 Aug 2021 19:01 #217699 by PCW
Replied by PCW on topic 7c80 install on rpi 4
The outputs on the 7C80 are SSRs:

net machine-is-enabled => hm2_7c80.0.ssr.00.out-00

gpio12 is a sserial expansion port on a 7C80
Do not set it to output mode or you will create a bus
conflict

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

More
14 Aug 2021 05:02 #217732 by Borsti
Replied by Borsti on topic 7c80 install on rpi 4
Thanks PCW !

Looks like I oversaw that and took the logic going backwards from the spindle outputs - but now looks like success!

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

More
16 Aug 2021 04:04 #217856 by Borsti
Replied by Borsti on topic 7c80 install on rpi 4
Hi PCW,

I played today with the spindle configuration as you proposed in the post, but the 7c80 is missing the pwm output in my "as received " condition 
...
net spindle-output => [HMOT](CARD0).pwmgen.00.value
net spindle-enable => [HMOT](CARD0).pwmgen.00.enable
...
unless there is a different flash for the card?

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

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