Changeset 2323
- Timestamp:
- 09/03/03 11:39:28 (21 years ago)
- Location:
- trunk/MagicSoft/Cosy
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/Changelog
r2280 r2323 1 1 -*-*- END -*-*- 2 2003/09/03 - Thomas Bretz 3 4 * aposs/Magic.m: 5 - updated to V0.69 6 7 8 2 9 2003/07/16 - Thomas Bretz (La Palma) 3 10 -
trunk/MagicSoft/Cosy/aposs/Magic.m
r2067 r2323 10 10 /* */ 11 11 kVERSION = 0 /* */ 12 kSUBVERSION = 6 8/* */12 kSUBVERSION = 69 /* */ 13 13 /* */ 14 14 /* HISTORY: */ 15 /* */ 16 /* * V0.69: */ 17 /* - Implemented Pre-Operational/Operational state */ 18 /* means: + cannot start RPM mode */ 19 /* + SDO 0x6004 (POSA/POSR) ignored */ 20 /* + new SDO 0x1000 */ 15 21 /* */ 16 22 /* * V0.68: */ … … 95 101 /* Object Dictionary: */ 96 102 /* */ 103 /* 0x1000 1 rw Start node (Pre-oprational --> operational) */ 97 104 /* 0x1003 x rw Read delete error list (subidx 0-9) */ 98 105 /* 0x1004 0 ro Nr of PDOs (transmit) */ … … 115 122 /* 0x2003 0 wo Acceleration */ 116 123 /* 1 wo Deceleration */ 117 /* 0x3000 x wo Motor 'on', 'off', 'stop' */ 124 /* 0x3000 x wo Motor 'on', 'off', 'stop' (Warning: Motor off can have */ 125 /* strange side effects if RF=1!) */ 118 126 /* 0x3001 x wo Home 'home' */ 119 127 /* 0x3002 x wo Reopen Communication 'open' */ … … 254 262 firsttimeout = 0 255 263 264 preop = kTRUE 265 256 266 /*-------------------------------------------------------------------------*/ 257 267 /* Can Open Definitions */ … … 351 361 gosub reset 352 362 goto mainloop 353 elseif mode==1then363 elseif (mode==1) then 354 364 print "Control not in PC mode!" 355 365 gosub reset 356 366 SET PRGPAR 0 357 367 exit 358 elseif fuse==0then368 elseif (fuse==0) then 359 369 print "Motor-Power Fuse not OK!" 360 370 gosub reset 361 371 goto mainloop 362 elseif vltg==0then372 elseif (vltg==0) then 363 373 print "Overvoltage control broken!" 364 374 gosub reset 365 375 goto mainloop 366 elseif emcy==0then376 elseif (emcy==0) then 367 377 print "Please release Emergency Stop!" 368 378 gosub reset … … 389 399 brake = 1 390 400 waitt 1000 391 endif 392 401 endif 402 403 /* This "motor on" is necessary to make sure the floating analog output 404 doesn't move the telescope (slowly) */ 393 405 motor on 394 406 … … 449 461 subidx = canhi&0xff 450 462 sdoval = (canlo&0xff)<<24 | (canlo&0xff00)<<8 | (canlo>>8)&0xff00 | (canlo>>24)&0xff 463 canlo = 0 451 464 /* 452 465 PRINT "Setting Idx:", idx, "/", subidx, " to ", sdoval 453 466 */ 454 if (idx==0x1003 and subidx==0 and sdoval==0) then 467 if (idx==0x1000 and subidx==1 and sdoval==1) then 468 preop = kFALSE 469 elseif (idx==0x1003 and subidx==0 and sdoval==0) then 455 470 i = 9 456 471 while (i) do … … 530 545 CANOUT sdotx (canhi&0xffffff | 0x60000000) 0 531 546 EXIT 532 elseif (idx == 0x3006) then 547 elseif (idx == 0x3006) then 533 548 if (subidx == 0) then 534 549 if (sdoval == ('s'<<24|'t'<<16|'r'<<8|'t')) then 535 CVEL 0 536 CSTART 537 elseif (sdoval == ('s'<<24|'t'<<16|'o'<<8|'p')) then 550 if (preop==kFALSE) then 551 CVEL 0 552 CSTART 553 else 554 canlo = 1 555 endif 556 elseif (sdoval == ('s'<<24|'t'<<16|'o'<<8|'p')) then 538 557 CSTOP 539 558 endif 540 559 elseif (subidx == 1) then 541 560 CVEL sdoval 542 endif 561 endif 543 562 elseif (idx == 0x3007) then 544 if (subidx==0 and sdoval == ('s'<<24|'y'<<16|'n'<<8|'c')) then 545 SYNCV 546 elseif (subidx==1 and sdoval == ('s'<<24|'y'<<16|'n'<<8|'c')) then 547 SYNCP 548 endif 563 if (preop==kFALSE) then 564 if (subidx==0 and sdoval == ('s'<<24|'y'<<16|'n'<<8|'c')) then 565 SYNCV 566 elseif (subidx==1 and sdoval == ('s'<<24|'y'<<16|'n'<<8|'c')) then 567 SYNCP 568 endif 569 else 570 canlo = 1 571 endif 549 572 elseif (idx == 0x3008) then 550 573 if (sdoval == ('o'<<24|'n'<<16)) then … … 576 599 endif 577 600 elseif (idx == 0x6004) then 578 if (subidx==0) then 579 POSA sdoval 580 elseif (subidx==1) then 581 POSR sdoval 601 if (preop==kFALSE) then 602 if (subidx==0) then 603 POSA sdoval 604 elseif (subidx==1) then 605 POSR sdoval 606 endif 607 else 608 canlo = 1 582 609 endif 583 610 elseif (idx == 0x6200) then … … 601 628 endif 602 629 603 CANOUT sdotx (canhi&0xffffff | 0x60000000) 0630 CANOUT sdotx (canhi&0xffffff | 0x60000000) canlo 604 631 /* 605 632 PRINT "Sdo Set ", idx, "/", subidx … … 615 642 /* 616 643 PRINT "Requesting Idx:", idx, "/", subidx 617 */ 618 if (idx == 0x1003) then 644 */ 645 if (idx == 0x1000 and subidx==1) then 646 sdoval = preop 647 elseif (idx == 0x1003) then 619 648 if (subidx >=0 and subidx<=9) then 620 649 sdoval = errlist[subidx-1]
Note:
See TracChangeset
for help on using the changeset viewer.