- Timestamp:
- 01/20/03 13:41:19 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/aposs/Manual.m
r1675 r1716 4 4 /* */ 5 5 kVERSION = 0 /* */ 6 kSUBVERSION = 2/* */6 kSUBVERSION = 3 /* */ 7 7 /* */ 8 8 /* HISTORY: */ 9 /* */ 10 /* * V0.3: */ 11 /* - added support for the elevation axis brake */ 12 /* - enabled check for operation mode (remote control/pc) */ 13 /* - added 'reset' label */ 14 /* - moved syncv/cstart to setting rf */ 9 15 /* */ 10 16 /* * V0.2: */ … … 135 141 136 142 /*-------------------------------------------------------------------------*/ 137 /* Make sure 'Reglerfreigabe' not set */138 /*-------------------------------------------------------------------------*/139 RF = 0140 out 1 0141 out 2 0142 143 /*-------------------------------------------------------------------------*/144 143 /* Error routine */ 145 144 /*-------------------------------------------------------------------------*/ … … 151 150 /* mainloop rotation mode but stand still */ 152 151 /*-------------------------------------------------------------------------*/ 153 if (get cannr==1) or (get cannr==3) then 154 print "Starting..." 155 else 156 /*motor off /* switch off motor controlling: No 'Schleppfehler' */ 157 print "Synchronizing..." 158 motor on 159 syncv 160 endif 152 153 brake = 0 154 155 reset: 156 out 1 0 157 out 2 0 158 RF = 0 159 motor off 160 waitt 1000 161 162 if (brake==1) then 163 waitt 3000 /* wait 3s for DKC to stop the motor */ 164 out (kIoModule+1) 0 /* brake the brake */ 165 waitt 1000 166 endif 161 167 162 168 mainloop: … … 168 174 if (get cannr==1) or (get cannr==2) then 169 175 ready = in 1 170 elseif get cannr==3then171 ready = in (kIoModule+5) 176 elseif (get cannr==3) then 177 ready = in (kIoModule+5) /* !!!FIXME!!! */ 172 178 endif 173 179 174 if fuse==0 then 180 if (ready==0) and (RF==1) then 181 print "DKC not ready, but RF set... setting RF=AH=0!" 182 goto reset 183 elseif fuse==0 then 175 184 print "Motor-Power Fuse not OK!" 176 waitt 500 177 goto mainloop 185 goto reset 186 elseif vltg==0 then 187 print "Overvoltage control broken!" 188 goto reset 178 189 elseif emcy==0 then 179 190 print "Please release Emergency Stop!" 180 waitt 500 181 goto mainloop 182 elseif vltg==0 then 183 print "Overvoltage control broken!" 184 waitt 500 185 goto mainloop 186 /* 187 elseif mode==1 then 191 goto reset 192 elseif mode==0 then 188 193 print "Control not in manual mode!" 189 out 1 0 190 out 2 0 191 waitt 500 192 exit 193 */ 194 elseif (ready==0) and (RF==1) then 195 print "DKC not ready... setting RF=AH=0!" 196 out 1 0 197 out 2 0 198 RF = 0 199 motor off 200 waitt 1000 201 goto mainloop 194 goto reset 202 195 elseif (ready==1) and (RF==0) then 203 196 print "DKC powered, RF=0... setting RF=AH=1!" … … 216 209 RF = 1 217 210 waitt 100 211 212 if (brake==0) then 213 out (kIoModule+1) 1 214 brake = 1 215 waitt 1000 216 endif 217 218 218 motor on 219 cstart 220 /*waitt 100*/ 219 220 if (get cannr==2) then 221 syncv 222 print "Synchronizing speed..." 223 else 224 cstart 225 print "Starting revolution mode..." 226 waitt 500 227 endif 221 228 elseif (ready==0) or (RF==0) then 222 229 goto mainloop … … 246 253 out 2 0 247 254 RF = 0 248 waitt 100 255 waitt 100 256 257 if (brake==1) then 258 waitt 5000 259 out (kIoModule+1) 0 260 waitt 500 261 endif 249 262 250 263 print "Error #", errno
Note:
See TracChangeset
for help on using the changeset viewer.