Delta Tau GEO BRICK LV User Manual

Page of 271
Geo Brick LV User Manual
 
PinOuts and Software Setup 
 53 
Ch. 5-8 PFM Setup Example 
// Encoder Conversion Table, for channels 5-8 
I8004=$C78100      
; Entry 5 incremental encoder, no extension 
I8005=$C78108   
; Entry 6 incremental encoder, no extension 
I8006=$C78110   
; Entry 7 incremental encoder, no extension 
I8007=$C78118   
; Entry 8 incremental encoder, no extension 
// Channels 5-8 Output Mode Select, Encoder/Decode 
I7116,4,10=3 
 
; Servo IC 1, Channels 5-8 Output Mode Select to PFM 
I7110,4,10=8           ; Servo IC 1, Channels 5-8 Encoder Decode, Internal Pulse and Direction 
// Channels 5-8 Command Output Register 
I502=$78104           ; Channel 5, PFM 
I602=$7810C 
 
; Channel 6, PFM 
I702=$78114 
 
; Channel 7, PFM 
I802=$7811C 
 
; Channel 8, PFM 
 
In PFM mode, it is possible to: 
 
Write directly to the PFM output register using the suggested M-Variable definition (Mxx07) 
The corresponding channel has to be deactivated in this mode (Ixx00=0) 
 
Issue open loop commands to a channel/motor, e.g.:#5O5 
The corresponding channel has to be activated in this mode (Ixx00=1) 
 
Issue closed loop commands to a channel/motor, e.g.: #5J=1000 
The corresponding channel has to be activated (Ixx00=1) and the position loop PID gains have to 
be implemented. 
 
Writing directly to the PFM register 
// Channels 5-8 Suggested M-Variables, PFM command output 
M507->Y:$78104,8,16,S  ; Channel 5, Min=0, Max= Calculated I569 
M607->Y:$7810C,8,16,S  ; Channel 6, Min=0, Max= Calculated I669 
M707->Y:$78114,8,16,S  ; Channel 7, Min=0, Max= Calculated I769 
M807->Y:$7811C,8,16,S  ; Channel 8, Min=0, Max= Calculated I869 
 
Writing directly to the suggested M-variable(s) values proportional to 
Ixx69 produces corresponding frequencies: 
Suggested  
M-
Variable 
Output 
Frequency 
PFM [KHz] 
1213 
11 
2427 
22 
Issuing Open-Loop Commands 
Activating the motor channel should be sufficient at this point to allow open loop commands. Note that an 
open  loop command  of zero  magnitude (#nO0)  will result in a zero  frequency output, and an  open  loop 
command of 100 (#nO100) will result in the maximum calculated frequency output.  
 
I500,4,100=1 
; Channels 5-8 active
 
 
Going back to the setup example, these are some open loop commands 
resulting frequencies: 
Open 
Loop 
Command 
Output 
Frequency 
PFM [KHz] 
50 
11 
100 
22