This is a non-realtime HAL program for the GS2 series of VFDs at Automation Direct.
[In Europe the equivalent can be found under the brand name Omron.]

Diese Komponente wird mit dem halcmd-Befehl "loadusr" geladen:

loadusr -Wn spindle-vfd gs2_vfd -n spindle-vfd

Der obige Befehl lautet: loadusr, wait for named to load, component gs2_vfd, named spindle-vfd. Der HAL-Befehl "loadusr" ist im Kapitel loadusr beschrieben.

1. Kommandozeilen-Optionen

  • -b oder --bits <n> (Standard: 8) Setzt die Anzahl der Datenbits auf n, wobei n von 5 bis einschließlich 8 reichen darf.

  • -d oder --device <path> (Standard /dev/ttyS0) Legt den Dateipfad fest zum Ansprechen des seriellen Geräts.

  • -g or --debug Turn on debugging messages. This will also set the verbose flag. Debug mode will cause all modbus messages to be printed in hex on the terminal.

  • -n or --name <string> (default: gs2_vfd) Set the name of the HAL module. The HAL comp name will be set to <string>, and all pin and parameter names will begin with <string>.

  • -p oder --parity {even,odd,none} (Voreinstellung: odd) Setzt die serielle Parität auf gerade (engl. even), ungerade (engl. odd) oder keine (engl. none).

  • -r or --rate <n> (default: 38400) Set baud rate to n. It is an error if the rate is not one of the following: 110, 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200.

  • -s oder --stopbits {1,2} (Voreinstellung: 1) Setzt die Anzahl von Stopbits auf 1 oder 2

  • -t or --target <n> (default: 1) Set MODBUS target (slave) number. This must match the device number you set on the GS2.

  • -v oder --verbose Schaltet Debug-Meldungen ein.

  • -A oder --accel-seconds <n> (Voreinstellung: 10.0) Sekunden um die Spindel von 0 auf max. U/min (engl. RPM) zu beschleunigen.

  • -D or --decel-seconds <n> (default: 0.0) Seconds to decelerate the spindle from max. RPM to 0. If set to 0.0 the spindle will be allowed to coast to a stop without controlled deceleration.

  • -R or --braking-resistor This argument should be used when a braking resistor is installed on the GS2 VFD (see Appendix A of the GS2 manual). It disables deceleration over-voltage stall prevention (see GS2 modbus Parameter 6.05), allowing the VFD to keep braking even in situations where the motor is regenerating high voltage. The regenerated voltage gets safely dumped into the braking resistor.

Anmerkung
Bei seriellen Konfigurationsfehlern kann das Einschalten von verbose zu einer Flut von Timeout-Fehlern führen.

2. Pins

Dabei ist <name> "gs2_vfd" oder der Name, der beim Laden mit der Option -n angegeben wurde:

  • <name>.DC-bus-volts (float, out) Zwischenkreisspannung des VFD

  • <name>.at-speed (bit, out), wenn der Antrieb die befohlene Geschwindigkeit erreicht

  • <name>.err-reset (bit, in) Reset-Fehler, die an VFD gesendet werden

  • <name>.firmware-revision (s32, out) vom VFD

  • <name>.frequency-command (float, out) vom VFD

  • <name>.frequency-out (float, out) aus dem VFD

  • <name>.is-stopped (Bit, aus), wenn der Frequenzumrichter 0 Hz-Ausgang meldet

  • <name>.load-percentage (float, out) vom VFD

  • <name>.motor-RPM (float, out) vom VFD

  • <name>.output-current (float, out) vom VFD

  • <name>.Ausgangsspannung (float, out) vom VFD

  • <name>.power-factor (float, out) vom VFD

  • <name>.scale-frequency (float, out) vom VFD

  • <name>.speed-command (float, in) an den VFD gesendete Geschwindigkeit in U/min. Es ist ein Fehler, eine Geschwindigkeit zu senden, die höher ist als die im VFD eingestellte Motor Max U/min (engl. RPM).

  • <name>.spindle-fwd (bit, in) 1 für FWD (engl. kurz für forwärts) und 0 für REV (engl. kurz für rückwärts) an den VFD gesendet

  • <name>.spindle-rev (bit, in) 1 für REV und 0 wenn aus

  • <name>.spindle-on (bit, in) 1 für EIN und 0 für AUS an VFD gesendet

  • <name>.status-1 (s32, out) Antriebsstatus des VFD (siehe GS2-Handbuch)

  • <name>.status-2 (s32, out) Laufwerksstatus des Frequenzumrichters (siehe GS2-Handbuch)

Anmerkung
The status value is a sum of all the bits that are on. So a 163 which means the drive is in the run mode is the sum of 3 (run) + 32 (freq set by serial) + 128 (operation set by serial).

3. Parameter

Dabei ist <name> gs2_vfd oder der Name, der beim Laden mit der Option -n angegeben wurde:

  • <name>.error-count (s32, RW)

  • <name>.loop-time (float, RW) wie oft der Modbus abgefragt wird (Standard: 0.1)

  • <name>.nameplate-HZ (float, RW) Typenschild-Hz des Motors (Voreinstellung: 60)

  • <name>.nameplate-RPM (float, RW) Typenschild-Drehzahl des Motors in U/min (Voreinstellung: 1730)

  • <name>.retval (s32, RW) der Rückgabewert eines Fehlers in HAL

  • <name>.tolerance (s32, RW) Geschwindigkeitstoleranz (Voreinstellung: 0.01)

  • <name>.ack-delay (s32, RW) Anzahl der Lese-/Schreibzyklen vor der Überprüfung bei Geschwindigkeit (Voreinstellung: 2)

Ein Beispiel für die Verwendung dieser Komponente zum Antreiben einer Spindel finden Sie im Beispiel GS2 Spindel.