Bostomatic 400-2 Retrofit

More
13 Dec 2021 02:54 #228986 by nduerr
Replied by nduerr on topic Bostomatic 400-2 Retrofit
I did not see the not on disabled IRQ coalescing.  I added what the man pg had and it seems to be working now.
Before there was no green flashing LED's on all of the boards, now they are flashing in sync and there are 4 green leds (cr1-cr4) on the 7i94 that are steady green.  I think they are talking!

I have attached my HAL & INI files, they are also on github:  github.com/bignickd1991/BOSTO400
These are really rough but its a start.
Thanks for the help!

Here are the current readings:
bosto400@Bosto400-linuxcnc:~$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 34:17:eb:c5:b0:83 brd ff:ff:ff:ff:ff:ff
    inet 10.10.10.2/8 brd 10.255.255.255 scope global eno1
       valid_lft forever preferred_lft forever
3: enp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 68:05:ca:e8:4c:4e brd ff:ff:ff:ff:ff:ff
    inet 192.168.90.101/24 brd 192.168.90.255 scope global dynamic noprefixroute enp4s0
       valid_lft 86191sec preferred_lft 86191sec
    inet6 fe80::6a05:caff:fee8:4c4e/64 scope link noprefixroute
       valid_lft forever preferred_lft forever
bosto400@Bosto400-linuxcnc:~$ halcmd show param *tmax
Parameters:
Owner   Type  Dir         Value  Name
    32  s32   RW          12976  abs.spindle.tmax
    38  s32   RW          21356  classicladder.0.refresh.tmax
    41  s32   RW           7876  foincr.tmax
    26  s32   RW              0  hm2_7i94.0.read-request.tmax
    26  s32   RW        1470460  hm2_7i94.0.read.tmax
    26  s32   RW          84112  hm2_7i94.0.write.tmax
    41  s32   RW          12472  jogincr.tmax
    35  s32   RW          11660  lowpass.spindle.tmax
    19  s32   RW          13392  motion-command-handler.tmax
    19  s32   RW          52480  motion-controller.tmax
    29  s32   RW          14176  pid.a.do-pid-calcs.tmax
    29  s32   RW          13712  pid.s.do-pid-calcs.tmax
    29  s32   RW          12820  pid.x.do-pid-calcs.tmax
    29  s32   RW          11288  pid.y.do-pid-calcs.tmax
    29  s32   RW           7660  pid.z.do-pid-calcs.tmax
    20  s32   RW        1567284  servo-thread.tmax
    41  s32   RW           2960  soincr.tmax


 
Attachments:

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

More
28 Dec 2021 04:04 #230114 by nduerr
Replied by nduerr on topic Bostomatic 400-2 Retrofit
PCW is the "26  s32   RW        1470460  hm2_7i94.0.read.tmax" a better value?  Or should I be looking to trouble shoot more.

I went through my HAL file and cleaned it up a little, but when I used the PNCCONF wizard the 7i94 card is not listed so I used a 7I80HD selection to create my initial hal file.  If someone has a working 7i94 hal that I could look at it may make more sense to me, I have been looking for one but have not seen one yet. 
The initial header is what I am trying to sort out now.  Using the current hal file Linuxcnc starts up with no errors, but I am unable to cycle the e-stop and start it up.  I suspect its something with this initializing sequence. 
This is the first part of the hal.  I commented out the lines that I couldn't resolve.  I am not sure if I need them, if I need to set them up differently or if I'm missing something.



# CUSTOM HAL Generated by NMD FOR BOSTOMATIC 400-2
# Using LinuxCNC version:  2.8

loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
loadrt hostmot2
loadrt hm2_eth board_ip="10.10.10.10"                       #config=" num_encoders=8 num_pwmgens=6 num_stepgens=0"
##setp    [HMOT](CARD0).pwmgen.pwm_frequency 20000
##setp    [HMOT](CARD0).pwmgen.pdm_frequency 6000000
##setp    [HMOT](CARD0).watchdog.timeout_ns 5000000

loadrt pid names=pid.x,pid.y,pid.z,pid.a,pid.s
loadrt abs names=abs.spindle
loadrt lowpass names=lowpass.spindle
loadrt classicladder_rt numPhysInputs=15 numPhysOutputs=15 numS32in=10 numS32out=10 numFloatIn=10 numFloatOut=10 numBits=50 numWords=50

loadrt mux16 names=jogincr,foincr,soincr

#  Set 7I94 pin 41 to false to see 7I89 encoder pins
setp hm2_7i94.0.gpio.041.is_output true
setp hm2_7i94.0.gpio.041.out false

addf hm2_7i94.0.read          servo-thread
addf motion-command-handler   servo-thread
addf motion-controller        servo-thread
addf pid.x.do-pid-calcs       servo-thread
addf pid.y.do-pid-calcs       servo-thread
addf pid.z.do-pid-calcs       servo-thread
addf pid.a.do-pid-calcs       servo-thread
addf pid.s.do-pid-calcs       servo-thread
addf classicladder.0.refresh servo-thread
addf jogincr                  servo-thread
addf foincr                   servo-thread
addf soincr                   servo-thread
addf abs.spindle              servo-thread
addf lowpass.spindle          servo-thread
addf hm2_7i94.0.write         servo-thread

 

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

More
28 Dec 2021 16:56 #230152 by PCW
Replied by PCW on topic Bostomatic 400-2 Retrofit
Note that there are no PWMgens in the 7I94 configuration, so the "num_pwmgens"
token must be removed (or the value set to 0).

For guidance on the Analog setup, you might look at a pncconf
created config for as 7I77. Other than the sserial name and channel
number, the setup should be pretty close.

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

More
27 Jan 2022 04:18 #233253 by nduerr
Replied by nduerr on topic Bostomatic 400-2 Retrofit
So I have been picking away at the to do list and I'm back on the Spindles...
I believe I have both spindles set up according to the spindles man page.  Hal file attached.
Question 1:  Is there a way to add halui pins and add them to Axes for the second spindle or is this something I will need to build in glade etc?

Question 2:  I noticed that there is an encoder on my main spindle and I have the pin out the 3CN connector see pics.  I am assuming that I feed a +-10 volts to the 626MTIII Drive and with the encoder input, the Drive is able to control speed etc independently.  Can I tap off of these signals back to an encoder input & linuxcnc to get an actual speed and link up for ridge tapping?  

Question 3:  I am not getting any voltage reading from my 7I83 when I put the spindle into forward.  The o-scope doesn't show any voltage either, but hal show sees the value increasing.  I am assuming the analogout0-scalemax is doing the same as the scale function would do but I am not positive.  Does anyone see something wrong in my hal or did I do more damage to the 7I83 cards than I first thought?
Thanks All!

#***********************************************************************
#  SPINDLE 0 Main
#***********************************************************************

# --- SPINDLE0 ---
setp hm2_7i94.0.7i83.0.1.analogout0-maxlim [SPINDLE_0]OUTPUT_MIN_LIMIT   #OUTPUT_MIN_LIMIT = -10.0
setp hm2_7i94.0.7i83.0.1.analogout0-minlim [SPINDLE_0]OUTPUT_MAX_LIMIT  #OUTPUT_MAX_LIMIT = 10.0
setp hm2_7i94.0.7i83.0.1.analogout0-scalemax [SPINDLE_0]OUTPUT_SCALE   #OUTPUT_SCALE = .0025


# --- WRC11 SPINDLE0_ENABLE - MAIN --- Output
net spindle0_enable  spindle.0.on  hm2_7i94.0.7i90.0.2.p1-out-22   

# ---spindle enable from 7I83
#net spindle0-enable     =>  hm2_7i94.0.7i83.0.1.analogena0
net spindle0-dac    spindle.0.speed-out  hm2_7i94.0.7i83.0.1.analogout0   

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

#setp    hm2_7i94.0.encoder.05.counter-mode true
#setp    hm2_7i94.0.encoder.05.filter 1
#setp    hm2_7i94.0.encoder.05.index-invert 0
#setp    hm2_7i94.0.encoder.05.index-mask 0
#setp    hm2_7i94.0.encoder.05.index-mask-invert 0
#setp    hm2_7i94.0.encoder.05.scale  [SPINDLE_0]ENCODER_SCALE  #ENCODER_SCALE = 4000.0


# ---setup spindle0 control signals---

net spindle0-vel-cmd-rps        <=  spindle.0.speed-out-rps
net spindle0-vel-cmd-rps-abs    <=  spindle.0.speed-out-rps-abs
net spindle0-vel-cmd-rpm-abs    <=  spindle.0.speed-out-abs
net spindle0-cw                 <=  spindle.0.forward
net spindle0-ccw                <=  spindle.0.reverse
net spindle0-brake              <=  spindle.0.brake
#net spindle0-revs          hm2_7i94.0.encoder.05.position      spindle.0.revs
net spindle0-at-speed           =>  spindle.0.at-speed
#net spindle0-vel-fb-rps    hm2_7i94.0.encoder.05.velocity-rpm  spindle.0.speed-in
#net spindle0-index-enable  hm2_7i94.0.encoder.05.index-enable  spindle.0.index-enable

# ---Setup spindle0 at speed signals---

sets spindle0-at-speed true

#Manual Spindle0 control
net spindle0-manual-cw     halui.spindle.0.forward
net spindle0-manual-ccw    halui.spindle.0.reverse
net spindle0-manual-stop   halui.spindle.0.stop


#***********************************************************************
#  SPINDLE 1 HS
#***********************************************************************
#  NEED TO ADD TO THE HALUI FOR SECOND SPINDLE


## --- SPINDLE_Parameters ---
setp hm2_7i94.0.7i83.0.1.analogout1-maxlim [SPINDLE_1]OUTPUT_MIN_LIMIT
setp hm2_7i94.0.7i83.0.1.analogout1-minlim [SPINDLE_1]OUTPUT_MAX_LIMIT
setp hm2_7i94.0.7i83.0.1.analogout0-scalemax [SPINDLE_1]OUTPUT_SCALE

# --- WRC1 SPINDLE1_ENABLE -HS --- Output
net spindle1_enable    spindle.1.on   hm2_7i94.0.7i90.0.2.p1-out-23  

# ---spindle enable from 7I83
#net spindle1-enable     =>  hm2_7i94.0.7i83.0.1.analogena1
net spindle1-DAC   spindle.1.speed-out  hm2_7i94.0.7i83.0.1.analogout1   

## ---setup spindle1 control signals---

#Manual Spindle control from panel
#net spindle1-manual-cw     halui.spindle.1.forward
#net spindle1-manual-ccw    halui.spindle.1.reverse
#net spindle1-manual-stop   halui.spindle.1.stop

#***********************************************************************




 
Attachments:

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

More
27 Jan 2022 15:29 - 27 Jan 2022 15:42 #233279 by PCW
Replied by PCW on topic Bostomatic 400-2 Retrofit
You have the 7I83 analog enable unconnected (and therefore false):

# ---spindle enable from 7I83
#net spindle0-enable => hm2_7i94.0.7i83.0.1.analogena0

setting the analog enable true

1. Enables the corresponding 7I83 analog output (it will be forced to 0V if not enabled)
2. Activates the corresponding 7I83 ENA pins (the are connected when enabled)
Last edit: 27 Jan 2022 15:42 by PCW.

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

More
02 Feb 2022 15:53 #233810 by nduerr
Replied by nduerr on topic Bostomatic 400-2 Retrofit
Ok, that makes sense now, The existing wiring enabled the spindle through the 7I90 pin. I pushed the 3 signals to classic ladder and got both outputs to work with the spindle.0.on pin.

I did get the voltage to output correctly using the hal scale function but not the setp scaling below. Do you have any docs about how these work? I found one post but the link was bad. I tested several different values and didn't get it to work correctly.

setp hm2_7i94.0.7i83.0.1.analogout0-maxlim [SPINDLE_0]OUTPUT_MIN_LIMIT
setp hm2_7i94.0.7i83.0.1.analogout0-minlim [SPINDLE_0]OUTPUT_MAX_LIMIT
setp hm2_7i94.0.7i83.0.1.analogout0-scalemax [SPINDLE_0]OUTPUT_SCALE

I am also trying to set up the illuminated panel buttons for the spindles while I am focused on them. I am good with the momentary control signals but I need to drive the light from the 7I73 board also.
I believe the outputs are 3.3V. Can I wire an LED bulb directly to the pin or should I run it thru a signal relay? There are 6 lights total on the panel.
Thanks

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

More
02 Feb 2022 18:14 - 02 Feb 2022 18:15 #233819 by PCW
Replied by PCW on topic Bostomatic 400-2 Retrofit
These settings depend on the ini values in the SPINDLE_0 section

setp hm2_7i94.0.7i83.0.1.analogout0-maxlim [SPINDLE_0]OUTPUT_MIN_LIMIT
setp hm2_7i94.0.7i83.0.1.analogout0-minlim [SPINDLE_0]OUTPUT_MAX_LIMIT
setp hm2_7i94.0.7i83.0.1.analogout0-scalemax [SPINDLE_0]OUTPUT_SCALE

Typically you would set OUTPUT_SCALE to the spindle RPM at 10V
and OUTPUT_MAX_LIMIT to the same value. For 0 to 10V spindles,
OUTPUT_MIN_LIMIT would be 0, and for +-10V spindles, OUTPUT_MIN_LIMIT
would be the spindle RPM at -10V (probably the same as OUTPUT_MAX_LIMIT
with a minus sign)

You can drive LEDs directly with 7I73 outputs but you need a series current limit
resistor, say 220 Ohm
Last edit: 02 Feb 2022 18:15 by PCW.

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

More
21 Feb 2022 03:09 #235442 by nduerr
Replied by nduerr on topic Bostomatic 400-2 Retrofit
Thanks PCW that worked once I corrected my typo's!
setp hm2_7i94.0.7i83.0.1.analogout0-maxlim [SPINDLE_0]OUTPUT_MAX_LIMIT
setp hm2_7i94.0.7i83.0.1.analogout0-minlim [SPINDLE_0]OUTPUT_MIN_LIMIT
setp hm2_7i94.0.7i83.0.1.analogout0-scalemax [SPINDLE_0]OUTPUT_SCALE

I also solved one of my other questions:
Question 1:  Is there a way to add halui pins and add them to Axes for the second spindle or is this something I will need to build in glade etc?
I needed to add SPINDLES = 2 to both the EMCMOT & TRAJ sections in the ini file.  I only had the EMCMOT one loaded.

Now continuing with the multiple spindles theme! 
I would like to make a second set of the spindle controls in Axis for the second spindle including the override slider.  I have searched for a few hours and I have not come across anything that would show how to do this.  If I missed it please add the link below!  I also need to setup a second set of values in the DISPLAY section of the ini for MAX_SPINDLE_OVERRIDE, MIN_SPINDLE_OVERRIDE & Default Spindle Speed.  My second spindle has a low of 10000rpm so the default of 200 wont work.

Also still looking for thoughts on this question.  My thought is if I'm controlling the spindle with a 0-10V signal the drive will control the spindle i=11.0ptndependently with the encoder signal, and worst case I will only get true spindle speed if I were to tap into the encoder signal. 
   
Question 2:  I noticed that there is an encoder on my main spindle and I have the pin out the 3CN connector see pics.  I am assuming that I feed a +-10 volts to the 626MTIII Drive and with the encoder input, the Drive is able to control speed etc independently.  Can I tap off of these signals back to an encoder input & linuxcnc to get an actual speed and link up for ridge tapping?  
 

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

Moderators: cncbasher
Time to create page: 0.117 seconds
Powered by Kunena Forum