Delta ASDA-A2 servo drive via ModbusRTU

More
04 May 2023 15:18 #270645 by Julien
Hey, I am trying to control my Delta ASDA-A2 servo drive via modbus RTU. I got a USB-RS485 adapter thats connected to my LinuxCNC PC. The PC sees the device (ttyUSB0) and I have set up the parameters in the drive.
address: 01
9600 baud
MODBUS RTU mode 8bit no parity bit 2 stop bits
Communication selection is set to RS-485

I am still trying to communicate with the drive without success. Maybe someone can help me. 

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

More
04 May 2023 17:10 #270649 by 0x2102
Replied by 0x2102 on topic Delta ASDA-A2 servo drive via ModbusRTU
What exactly are you trying to do with the servo drive (via ModBus)? You might be able to use ModBus to control the drive in PR mode but not in PT mode for any realtime application like a CNC machine.

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

More
04 May 2023 17:26 #270652 by Julien
Replied by Julien on topic Delta ASDA-A2 servo drive via ModbusRTU
My spindle ist mounted on that servo drive. It was connected to an analog output until now. I'd like to change the speed and direction via ModBus.

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

More
04 May 2023 17:58 #270656 by 0x2102
Replied by 0x2102 on topic Delta ASDA-A2 servo drive via ModbusRTU
Not sure if I would Modbus to control a spindle, due to safety concerns. I would probably use a StepGen, if you have one available (un-used).

Nevertheless, if I play with a new Modbus device I usually start with the command line tool "modpoll" - link below, to see if the communication is good, I can read the register etc.

Make sure that you have read access to your /dev/ttyUSB0 device.

Create a new udev rule, like below and reload the rule-set or reboot.

cnc@lcnc-dev:/etc/udev/rules.d$ cat 50-myusb.rules
KERNEL=="ttyUSB[0-9]*",MODE="0666"
KERNEL=="ttyACM[0-9]*",MODE="0666"

cnc@lcnc-dev:/etc/udev/rules.d$ sudo udevadm control --reload

www.modbusdriver.com/modpoll.html

Once you can communicate with the drive, you can look into Modbus2HAL or ClassicLadder.

A servo spindle control via Modbus is very manual and not well documented/used. There are usually dedicated components for VFD control via Modbus, but you can't use them or would need to modify them for your use case.

What other hardware/options do you have available beside Modbus?

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

More
04 May 2023 18:29 #270660 by Julien
Replied by Julien on topic Delta ASDA-A2 servo drive via ModbusRTU
Actually I have both other options, step/dir or analogue output (Mesa 7i96s, using 4 step/dir for Axis XYZA), but I am not shure if I am able to control the ASDA-A2 with step/dir or analogue to do taping. I just wired the encoder and it seems to work fine with the mesa card.

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

More
04 May 2023 18:49 - 04 May 2023 18:50 #270661 by 0x2102
Replied by 0x2102 on topic Delta ASDA-A2 servo drive via ModbusRTU
Modbus is the least desired option when you want to do tapping.

Step/dir in velocity mode will work the best. Analog command input will require -10V (reverse) to 10V (forward), which the 7i96s doesn't provide. Step/dir is all you need to control the servo motor, also as a spindle drive.
Last edit: 04 May 2023 18:50 by 0x2102.

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

More
04 May 2023 18:50 #270662 by Julien
Replied by Julien on topic Delta ASDA-A2 servo drive via ModbusRTU
OK, thank you very much. I will change to step/dir then.

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

More
05 May 2023 01:30 #270690 by Julien
Replied by Julien on topic Delta ASDA-A2 servo drive via ModbusRTU
OK, if I haven't missed something in the manual the ASDA-A2 can only be controlled via step/dir in Positioning mode. So for speed mode I have to stick to the analogue signal.

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

More
05 May 2023 18:08 - 05 May 2023 18:22 #270743 by 0x2102
Replied by 0x2102 on topic Delta ASDA-A2 servo drive via ModbusRTU
You can keep the A2 set to PT mode and configure the StegGen in LinuxCNC for velocity mode.

(bit input) control-type
Switches between position control mode (0) and velocity control mode (1). Defaults to position control (0).

setp   hm2_7i95.0.stepgen.04.dirsetup        [SPINDLE_0]DIRSETUP
setp   hm2_7i95.0.stepgen.04.dirhold         [SPINDLE_0]DIRHOLD
setp   hm2_7i95.0.stepgen.04.steplen         [SPINDLE_0]STEPLEN
setp   hm2_7i95.0.stepgen.04.stepspace       [SPINDLE_0]STEPSPACE
setp   hm2_7i95.0.stepgen.04.position-scale  [SPINDLE_0]STEP_SCALE
setp   hm2_7i95.0.stepgen.04.step_type        0
setp   hm2_7i95.0.stepgen.04.control-type     1
setp   hm2_7i95.0.stepgen.04.maxaccel         [SPINDLE_0]STEPGEN_MAXACCEL
setp   hm2_7i95.0.stepgen.04.maxvel           [SPINDLE_0]STEPGEN_MAXVEL

You can use PncconfWizard to configure a "test machine" and use one of your StepGen as a "Spindle StepGen". Then copy the spindle configuration to your actual machine configuration. 
Last edit: 05 May 2023 18:22 by 0x2102.

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

More
22 May 2023 14:22 #271937 by Julien
Replied by Julien on topic Delta ASDA-A2 servo drive via ModbusRTU
It works like a charm and so much mor precise than 0-5V. Thank you alot.
I just have one problem now.
If I run the spindle I get this error message:
hm2/hm2_7i96s.0: stepgen.04.maxvel is too big
for current step timings &
position-scale, clipping to max possible

The funny thing is, that the spindle is working without any problem up to 10000 rpm (Servo runs up to 5000rpm with a 1:2 belt to the spindle)
I have wired the High Speed input of the servo drive.
Here are my .ini values:
#==================
# SPINDLE
#==================
[SPINDLE_0]
MAX_VELOCITY = 10000.0000
MAX_ACCELERATION = 30.0
# Die folgenden Werte sollten 25% größer sein als MAX_VELOCITY und MAX_ACCELERATION
# Bei Verwendung der UMKEHRSPIEL-Kompensation sollte STEPGEN_MAXACCEL um 100% größer sein.
STEPGEN_MAXVEL = 12500.0
STEPGEN_MAXACCEL = 37.500
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 = 10000.0
OUTPUT_MIN_LIMIT = -10000
OUTPUT_MAX_LIMIT = 10000
# diese sind in Nanosekunden
DIRSETUP = 250
DIRHOLD = 250
STEPLEN = 150
STEPSPACE = 150
STEP_SCALE = 5000.0
ENCODER_SCALE = -5000

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

Time to create page: 0.067 seconds
Powered by Kunena Forum