Changeset 9439 for trunk/MagicSoft/Cosy/main/MTracking.cc
- Timestamp:
- 05/09/09 13:48:12 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/main/MTracking.cc
r9435 r9439 33 33 // Send the new velocities for both axes. 34 34 // 35 fCosy->fMac2->SendSDO(0x300 6, 1, (LWORD_t)(v.Zd()*vrzd)); // SetRpmVelocity [re/min]36 fCosy->fMac1->SendSDO(0x300 6, 1, (LWORD_t)(v.Az()*vraz)); // SetRpmVelocity [re/min]35 fCosy->fMac2->SendSDO(0x3007, (LWORD_t)(v.Zd()*vrzd)); // SetRpmVelocity [re/min] 36 fCosy->fMac1->SendSDO(0x3007, (LWORD_t)(v.Az()*vraz)); // SetRpmVelocity [re/min] 37 37 38 38 // 39 39 // Wait for the objects to be acknoledged. 40 40 // 41 fCosy->fMac2->WaitForSdo(0x300 6, 1, 100);42 fCosy->fMac1->WaitForSdo(0x300 6, 1, 100);41 fCosy->fMac2->WaitForSdo(0x3007, 0, 100); 42 fCosy->fMac1->WaitForSdo(0x3007, 0, 100); 43 43 44 44 // … … 272 272 { 273 273 /* 274 sla.Now(1); 274 // Code for position control mode 275 // Set: S-0-0001 276 // Set: S-0-0002 277 // Set: P-0-0099 278 // Set: P-0-0187 (Spline) 279 // Replace S-0-0258 by S-0-0047 in communication 280 281 sla.Now(); 275 282 const ZdAz pointing = sla.CalcZdAz(fCosy->fRaDec); // [rad] 276 283 ZdAz dest = fCosy->AlignTrackingPos(pointing); // fix ambiguity … … 279 286 break; 280 287 dest *= 1./TMath::TwoPi(); //[rev] 281 fCosy->fMac2->SendSDO(0x6004, 0,(LWORD_t)(dest.Zd()*fCosy->fMac2->GetPosRes()+.5), false);282 fCosy->fMac1->SendSDO(0x6004, 0,(LWORD_t)(dest.Az()*fCosy->fMac1->GetPosRes()+.5), false);283 usleep(10000 0); // 1s288 fCosy->fMac2->SendSDO(0x6004, (LWORD_t)(dest.Zd()*fCosy->fMac2->GetPosRes()+.5), false); 289 fCosy->fMac1->SendSDO(0x6004, (LWORD_t)(dest.Az()*fCosy->fMac1->GetPosRes()+.5), false); 290 usleep(10000); // 10ms 284 291 continue; 285 292 */
Note:
See TracChangeset
for help on using the changeset viewer.