1. Beispiel
Dieses Beispiel zeigt die Verbindungen benötigt, um eine Automation Direct GS2 VFD verwenden, um eine Spindel zu fahren. Die Spindeldrehzahl und Richtung werden von LinuxCNC gesteuert.
Using the GS2 component involves very little to set up. We start with a StepConf Wizard generated config. Make sure the pins with "Spindle CW" and "Spindle PWM" are set to unused in the parallel port setup screen.
In der custom.hal Datei platzieren wir das Folgende, um LinuxCNC mit dem GS2 zu verbinden und LinuxCNC den Antrieb steuern zu lassen.
# load the non-realtime component for the Automation Direct GS2 VFDs loadusr -Wn spindle-vfd gs2_vfd -r 9600 -p none -s 2 -n spindle-vfd # connect the spindle direction pin to the GS2 net gs2-fwd spindle-vfd.spindle-fwd <= spindle.N.forward # connect the spindle on pin to the GS2 net gs2-run spindle-vfd.spindle-on <= spindle.N.on # connect the GS2 at speed to the motion at speed net gs2-at-speed spindle.N.at-speed <= spindle-vfd.at-speed # connect the spindle RPM to the GS2 net gs2-RPM spindle-vfd.speed-command <= spindle.N.speed-out
Anmerkung
|
The transmission speed might be able to be faster depending on the exact environment. Both the drive and the command line options must match. To check for transmission errors add the -v command line option and run from a terminal. |
On the GS2 drive itself you need to set a couple of things before the modbus communications will work. Other parameters might need to be set based on your physical requirements but these are beyond the scope of this manual. Refer to the GS2 manual that came with the drive for more information on the drive parameters.
-
Die Kommunikationsschalter müssen auf RS-232C eingestellt sein.
-
Die Motorparameter müssen so eingestellt werden, dass sie mit dem Motor übereinstimmen.
-
P3.00 (Source of Operation Command) muss auf Operation determined by RS-485 interface, 03 oder 04 gesetzt sein.
-
P4.00 (Quelle des Frequenzbefehls) muss auf "Frequenz bestimmt durch RS232C/RS485-Kommunikationsschnittstelle" eingestellt werden, 05.
-
P9.01 (Übertragungsgeschwindigkeit) muss auf 9600 Baud eingestellt werden, 01.
-
P9.02 (Kommunikationsprotokoll) muss auf "Modbus RTU-Modus, 8 Datenbits, keine Parität, 2 Stoppbits" eingestellt werden, 03.
Ein auf diesem Beispiel basierendes PyVCP-Panel ist hier.