Changeset 8870 for trunk/MagicSoft/Cosy/aposs
- Timestamp:
- 02/22/08 11:44:52 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/aposs/Magic.m
r2323 r8870 10 10 /* */ 11 11 kVERSION = 0 /* */ 12 kSUBVERSION = 69/* */12 kSUBVERSION = 70 /* */ 13 13 /* */ 14 14 /* HISTORY: */ 15 /* */ 16 /* * V0.70: */ 17 /* - Implemented switch off of motor in case of Input 6 has a */ 18 /* falling edge */ 19 /* - moved the arbitrary factor 4 for the tracking speed from */ 20 /* cosy to here */ 15 21 /* */ 16 22 /* * V0.69: */ … … 323 329 kIoModule = 4*256 324 330 331 ON INT -(kIoModule+6) GOSUB DOOR_STATUS_CHANGED 332 ON INT (kIoModule+6) GOSUB DOOR_STATUS_CHANGED 333 325 334 /*-------------------------------------------------------------------------*/ 326 335 /* Init */ … … 337 346 canlo = 1 338 347 339 348 brake = 0 340 349 RF = 0 341 350 … … 354 363 emcy = in (kIoModule+2) 355 364 vltg = in (kIoModule+3) 356 mode = in (kIoModule+4) 365 mode = in (kIoModule+4) 366 door = in (kIoModule+6) 357 367 ready = in 1 358 368 359 if (ready==0) and (RF==1) then 369 if (door==0) then 370 preop = kTRUE 371 endif 372 373 if (preop==kTRUE) then 374 print "Door open!" 375 gosub reset 376 elseif (ready==0) and (RF==1) then 360 377 print "DKC not ready, but RF set... setting RF=AH=0!" 361 378 gosub reset … … 465 482 PRINT "Setting Idx:", idx, "/", subidx, " to ", sdoval 466 483 */ 467 if (idx==0x1000 and subidx==1 and sdoval==1) then 468 preop = kFALSE 484 if (idx==0x1000 and subidx==1) then 485 if (sdoval==1) then 486 if (door==0) then 487 canlo = 1 488 else 489 preop = kFALSE 490 endif 491 elseif 492 preop = kTRUE 493 endif 469 494 elseif (idx==0x1003 and subidx==0 and sdoval==0) then 470 495 i = 9 … … 558 583 endif 559 584 elseif (subidx == 1) then 560 CVEL sdoval 585 /* It is unclear where this arbitraty factor comes from */ 586 CVEL sdoval/4 561 587 endif 562 588 elseif (idx == 0x3007) then … … 696 722 sdoval = AXEND 697 723 elseif (idx == 0x2002) then 698 sdoval = AVEL 724 sdoval = AVEL*4 699 725 elseif (idx == 0x2003) then 700 726 if (subidx==0) then … … 784 810 /*-------------------------------------------------------------------------*/ 785 811 SUBPROG PROC_PDO1 786 CANOUT pdo1 AXEND APOS 812 CANOUT pdo1 (AXEND|(preop<<9)) APOS 813 RETURN 814 815 /*-------------------------------------------------------------------------*/ 816 /* FENCE OPENED */ 817 /*-------------------------------------------------------------------------*/ 818 SUBPROG DOOR_STATUS_CHANGED 819 preop = kTRUE 787 820 RETURN 788 821
Note:
See TracChangeset
for help on using the changeset viewer.