source: trunk/MagicSoft/Cosy/devdrv/macs.cc@ 2015

Last change on this file since 2015 was 1959, checked in by tbretz, 22 years ago
*** empty log message ***
File size: 20.6 KB
Line 
1#include "macs.h"
2
3#include <iostream.h>
4#include <sys/time.h> // timeval->tv_sec
5
6#include "timer.h"
7#include "network.h"
8#include "MLogManip.h"
9
10ClassImp(Macs);
11
12/*
13 ---------------------------
14 For test purposes
15 ---------------------------
16
17class MyTimer : public TTimer
18{
19public:
20 MyTimer(TObject *obj, Long_t ms, Bool_t mode) : TTimer(obj, ms, mode) {}
21 Bool_t Notify()
22 {
23 cout << "Notify" << endl;
24 TTimer::Notify();
25 return kTRUE;
26 }
27};
28*/
29
30Macs::Macs(const BYTE_t nodeid, const char *name, MLog &out)
31 : NodeDrv(nodeid, name, out), fMacId(2*nodeid+1),
32 fPos(0), fPosTime(0.0), fPdoPos(0), fPdoTime(0.0),
33 fPosActive(0), fRpmActive(0), fStatusPdo3(0xff)
34{
35// fTimeout = new TTimer(this, 100); //, kFALSE); // 100ms, asynchronous
36}
37
38Macs::~Macs()
39{
40 //fTimerOn = kFALSE;
41 // delete fTimeout;
42}
43
44void Macs::HandleSDO(WORD_t idx, BYTE_t subidx, LWORD_t val, timeval_t *tv)
45{
46 // cout << "SdoRx: Idx=0x"<< hex << idx << "/" << (int)subidx;
47 // cout << ", val=0x" << val << endl;
48 switch (idx)
49 {
50 case 0x1003:
51 // FIXME, see Init
52 if (subidx!=2)
53 return;
54 lout << "- " << GetNodeName() << ": Error[0]=" << dec << val << endl;
55 SetError(val);
56 return;
57
58 case 0x100a:
59 lout << "- " << GetNodeName() << ": Using Software Version V" << dec << (int)(val>>16) << "." << (int)(val&0xff) << endl;
60 fSoftVersion = val;
61 return;
62
63 case 0x100b:
64 // Do not display, this is used for CheckConnection
65 // lout << "Node ID: " << dec << val << endl;
66 return;
67
68 case 0x2002:
69 cout << GetNodeName() << ": Current velocity: " << dec << val << endl;
70 fVel = val;
71 return;
72
73 case 0x6004:
74 if (subidx)
75 return;
76
77// lout << "Actual Position: " << dec << (signed long)val << endl;
78 fPos = (LWORDS_t)val;
79 fPosTime.SetTimer(tv);
80 return;
81/*
82 case 0x2001:
83 cout << "Axe Status: 0x" << hex << val << endl;
84 cout << " - Motor " << (val&0x01?"standing":"moving") << endl;
85 cout << " - Positioning " << (val&0x02?"active":"inactive") << endl;
86 cout << " - Rotary mode " << (val&0x04?"active":"inactive") << endl;
87 cout << " - Attitude control: " << (val&0x40?"off":"on") << endl;
88 cout << " - Axe resetted: " << (val&0x80?"yes":"no") << endl;
89 fPosActive = val&0x02;
90 fRpmActive = val&0x04;
91 return;
92 case 0x2003:
93 if (!subidx)
94 {
95 cout << "Input State: ";
96 for (int i=0; i<8; i++)
97 cout << (int)(val&(1<<i)?1:0);
98 cout <<endl;
99 return;
100 }
101 cout << "Input No." << subidx << (val?"hi":"lo") << endl;
102 return;
103 case 0x2004:
104 cout << "Status Value of Axis: 0x" << hex << val << endl;
105 cout << " - Attitude control: " << (val&0x800000?"off":"on") << endl;
106 cout << " - Movement done: " << (val&0x040000?"yes":"no") << endl;
107 cout << " - Number of Control Units: " << (int)((val>>8)&0xff) << endl;
108 cout << " - Attitude control: " << (val&0x04?"off":"on") << endl;
109 cout << " - Startswitch active: " << (val&0x20?"yes":"no") << endl;
110 cout << " - Referenceswitch active: " << (val&0x40?"yes":"no") << endl;
111 cout << " - Endswitch active: " << (val&0x80?"yes":"no") << endl;
112 return;
113*/
114
115 case 0x6002:
116 lout << "- " << GetNodeName() << ": Velocity resolution = " << dec << val << " ticks/min" << endl;
117 fVelRes = val;
118 return;
119
120 case 0x6501:
121 lout << "- " << GetNodeName() << ": Encoder resolution = " << dec << val << " ticks/min" << endl;
122 fRes = val;
123 return;
124 }
125 cout << "Macs: SDO, idx=0x"<< hex << idx << "/" << (int)subidx;
126 cout << ", val=0x"<<val<<endl;
127}
128
129void Macs::HandleSDOOK(WORD_t idx, BYTE_t subidx, timeval_t *tv)
130{
131// cout << "Node #" << dec << (int)GetId() << ": Sdo=" << hex << idx << "/" << (int)subidx << " set." << endl;
132 switch (idx)
133 {
134 case 0x2002:
135 switch (subidx)
136 {
137 case 0:
138 //lout << ddev(MLog::eGui);
139 lout << "- " << GetNodeName() << ": Velocity set." << endl;
140 //lout << edev(MLog::eGui);
141 return;
142 }
143 break;
144
145 case 0x2003:
146 switch (subidx)
147 {
148 case 0:
149 //lout << ddev(MLog::eGui);
150 lout << "- " << GetNodeName() << ": Acceleration set." << endl;
151 //lout << edev(MLog::eGui);
152 return;
153 case 1:
154 //lout << ddev(MLog::eGui);
155 lout << "- " << GetNodeName() << ": Decceleration set." << endl;
156 //lout << edev(MLog::eGui);
157 return;
158 }
159 break;
160
161 case 0x3006:
162 switch (subidx)
163 {
164 case 0:
165 //lout << ddev(MLog::eGui);
166 lout << "- " << GetNodeName() << ": RPM mode switched." << endl;
167 //lout << edev(MLog::eGui);
168 return;
169
170 case 1:
171 /*
172 lout << ddev(MLog::eGui);
173 lout << "- Velocity set (" << GetNodeName() << ")" << endl;
174 lout << edev(MLog::eGui);
175 */
176 return;
177 }
178 break;
179
180 case 0x4000:
181 HandleNodeguard(tv);
182 return;
183
184 case 0x6004:
185 switch (subidx)
186 {
187 case 0:
188 //lout << ddev(MLog::eGui);
189 lout << "- " << GetNodeName() << ": Absolute positioning started." << endl;
190 //lout << edev(MLog::eGui);
191 return;
192
193 case 1:
194 //lout << ddev(MLog::eGui);
195 lout << "- " << GetNodeName() << ": Relative positioning started." << endl;
196 //lout << edev(MLog::eGui);
197 return;
198 }
199 break;
200
201
202 }
203 NodeDrv::HandleSDOOK(idx, subidx, tv);
204}
205
206void Macs::ReqVelRes()
207{
208 lout << "- " << GetNodeName() << ": Requesting velocity resolution (velres, 0x6002)." << endl;
209 RequestSDO(0x6002);
210 WaitForSdo(0x6002);
211}
212
213void Macs::ReqRes()
214{
215 lout << "- " << GetNodeName() << ": Requesting encoder resolution (res, 0x6501)." << endl;
216 RequestSDO(0x6501);
217 WaitForSdo(0x6501);
218}
219
220void Macs::SetPDO1On(BYTE_t flag)
221{
222 lout << "- " << GetNodeName() << ": " << (flag?"Enable":"Disable") << " PDO1." << endl;
223 SendSDO(0x1800, 1, (LWORD_t)(flag?0:1)<<31);
224 WaitForSdo(0x1800, 1);
225}
226
227void Macs::CheckConnection()
228{
229 RequestSDO(0x100b);
230 WaitForSdo(0x100b);
231}
232
233void Macs::Init()
234{
235 //
236 // Request current error status (FIXME: is the first entry in the
237 // error list)
238 //
239 lout << "- " << GetNodeName() << ": Requesting Error[0]." << endl;
240 RequestSDO(0x1003, 2);
241 WaitForSdo(0x1003, 2);
242 if (HasError())
243 {
244 lout << "Macs::Init: " << GetNodeName() << " has error --> ZOMBIE!" << endl;
245 SetZombie();
246 }
247 if (IsZombieNode())
248 return;
249
250 StopHostGuarding();
251 StopGuarding();
252
253 usleep(2000*GetGuardTime());
254
255 lout << "- " << GetNodeName() << ": Requesting Mac Software Version." << endl;
256 RequestSDO(0x100a);
257 WaitForSdo(0x100a);
258 // FIXME! Not statically linked!
259 if (fSoftVersion<0x00000044) // 00.68
260 {
261 lout << GetNodeName() << " - Software Version too old!" << endl;
262 SetZombie();
263 return;
264 }
265
266 SetRpmMode(FALSE);
267
268 ReqRes(); // Init fRes
269 ReqVelRes(); // Init fVelRes
270
271 lout << "- " << GetNodeName() << ": Motor on." << endl;
272 SendSDO(0x3000, string('o', 'n'));
273 WaitForSdo(0x3000);
274
275 SetPDO1On(FALSE); // this is a workaround for the Macs
276 SetPDO1On(TRUE);
277
278 SetNoWait(TRUE);
279
280// StartGuarding(250, 4);
281// StartHostGuarding();
282}
283
284void Macs::StopMotor()
285{
286 //
287 // Stop the motor and switch off the position control unit
288 //
289 SendSDO(0x3000, string('s','t','o','p'));
290 WaitForSdo(0x3000);
291}
292
293void Macs::StopDevice()
294{
295 //EnableTimeout(kFALSE);
296
297 SetNoWait(FALSE);
298
299 StopHostGuarding();
300 StopGuarding();
301
302 //
303 // FIXME: This isn't called if the initialization isn't done completely!
304 //
305
306 SetRpmMode(FALSE);
307
308 SetPDO1On(FALSE);
309
310 /*
311 lout << "- " << GetNodeName() << ": Motor off." << endl;
312 SendSDO(0x3000, string('o', 'f', 'f'));
313 WaitForSdo(0x3000);
314 */
315
316 /*
317 lout << "- Stopping Program of " << (int)GetId() << endl;
318 SendSDO(0x4000, (LWORD_t)0xaffe);
319 WaitForSdo();
320 */
321}
322
323void Macs::ReqPos()
324{
325 lout << "- " << GetNodeName() << ": Requesting Position." << endl;
326 RequestSDO(0x6004);
327 WaitForSdo(0x6004);
328}
329
330void Macs::ReqVel()
331{
332 lout << "- " << GetNodeName() << ": Requesting Velocity." << endl;
333 RequestSDO(0x2002);
334 WaitForSdo(0x2002);
335}
336
337void Macs::SetHome(LWORDS_t pos, WORD_t maxtime)
338{
339 StopHostGuarding();
340 StopGuarding();
341
342 lout << "- " << GetNodeName() << ": Driving to home position, Offset=" << dec << pos << endl;
343 SendSDO(0x6003, 2, (LWORD_t)pos); // home
344 WaitForSdo(0x6003, 2);
345
346 // home also defines the zero point of the system
347 // maximum time allowd for home drive: 25.000ms
348 SendSDO(0x3001, string('h','o','m','e')); // home
349 WaitForSdo(0x3001, 0, maxtime*1000);
350 lout << "- " << GetNodeName() << ": Home position reached. " << endl;
351
352 SendSDO(0x6003, 0, string('s','e','t')); // home
353 WaitForSdo(0x6003, 0);
354
355 StartGuarding();
356 StartHostGuarding();
357}
358
359void Macs::SetVelocity(LWORD_t vel)
360{
361 SendSDO(0x2002, vel); // velocity
362 WaitForSdo(0x2002, 0);
363}
364
365void Macs::SetAcceleration(LWORD_t acc)
366{
367 SendSDO(0x2003, 0, acc); // acceleration
368 WaitForSdo(0x2003, 0);
369}
370
371void Macs::SetDeceleration(LWORD_t dec)
372{
373 SendSDO(0x2003, 1, dec); // acceleration
374 WaitForSdo(0x2003, 1);
375}
376
377void Macs::SetRpmMode(BYTE_t mode)
378{
379 //
380 // SetRpmMode(FALSE) stop the motor, but lets the position control unit on
381 //
382 SendSDO(0x3006, 0, mode ? string('s','t','r','t') : string('s','t','o','p'));
383 WaitForSdo(0x3006, 0);
384}
385
386void Macs::SetRpmVelocity(LWORDS_t cvel)
387{
388 SendSDO(0x3006, 1, (LWORD_t)cvel);
389 WaitForSdo(0x3006, 1);
390}
391
392void Macs::StartRelPos(LWORDS_t pos)
393{
394 SendSDO(0x6004, 1, (LWORD_t)pos);
395}
396
397void Macs::StartAbsPos(LWORDS_t pos)
398{
399 SendSDO(0x6004, 0, (LWORD_t)pos);
400}
401
402void Macs::SetNoWait(BYTE_t flag)
403{
404 lout << "- " << GetNodeName() << ": Setting NOWAIT " << (flag?"ON":"OFF") << "." << endl;
405 SendSDO(0x3008, flag ? string('o', 'n') : string('o', 'f', 'f'));
406 WaitForSdo(0x3008);
407}
408
409void Macs::StartVelSync()
410{
411 //
412 // The syncronization mode is disabled by a 'MOTOR STOP'
413 // or by a positioning command (POSA, ...)
414 //
415 lout << "- " << GetNodeName() << ": Starting RPM Sync Mode." << endl;
416 SendSDO(0x3007, 0, string('s', 'y', 'n', 'c'));
417 WaitForSdo(0x3007, 0);
418}
419
420void Macs::StartPosSync()
421{
422 //
423 // The syncronization mode is disabled by a 'MOTOR STOP'
424 // or by a positioning command (POSA, ...)
425 //
426 lout << "- " << GetNodeName() << ": Starting Position Sync Mode." << endl;
427 SendSDO(0x3007, 1, string('s', 'y', 'n', 'c'));
428 WaitForSdo(0x3007, 1);
429}
430/*
431void Macs::ReqAxEnd()
432{
433 RequestSDO(0x2001);
434 WaitForSdo(0x2001);
435}
436*/
437void Macs::SendMsg(BYTE_t data[6])
438{
439 GetNetwork()->SendCanFrame(fMacId, 0, 0, data[0], data[1], data[2], data[3], data[4], data[5]);
440}
441
442void Macs::SendMsg(BYTE_t d0=0, BYTE_t d1=0, BYTE_t d2=0,
443 BYTE_t d3=0, BYTE_t d4=0, BYTE_t d5=0)
444{
445 GetNetwork()->SendCanFrame(fMacId, 0, 0, d0, d1, d2, d3, d4, d5);
446}
447
448void Macs::HandlePDO1(BYTE_t *data, timeval_t *tv)
449{
450 fPdoPos = (data[4]<<24) | (data[5]<<16) | (data[6]<<8) | data[7];
451
452 // data[3]&0x01; // motor not moving
453 fPosActive = data[3]&kPosActive; // positioning active
454 fRpmActive = data[3]&kRpmActive; // RPM mode switched on
455 // data[3]&0x08; // - unused -
456 // data[3]&0x10; // - unused -
457 // data[3]&0x20; // - unused -
458 fInControl = data[3]&0x40; // motor uncontrolled
459 // data[3]&0x80; // axis resetted (after errclr, motor stop, motor on)
460
461 fStatus = data[3];
462
463 fPdoTime.SetTimer(tv);
464}
465
466void Macs::HandlePDO2(BYTE_t *data, timeval_t *tv)
467{
468 LWORDS_t errnum = (data[0]<<24) | (data[1]<<16) | (data[2]<<8) | data[3];
469 LWORDS_t errinf = (data[4]<<24) | (data[5]<<16) | (data[6]<<8) | data[7];
470
471 //
472 // errnum==0 gives a sudden information that something happened. Now the
473 // microcontroller is running inside its interrupt procedure which
474 // stopped the normal program. The interrupt procedure should try to clear
475 // the error state of the hardware. This should never create a new error!
476 //
477 if (!errnum)
478 {
479 lout << "- " << GetNodeName() << ": reports Error occursion." << endl;
480 lout << "Macs::HandlePDO2: " << GetNodeName() << " --> ZOMBIE!" << endl;
481 SetZombie();
482 SetError(-1);
483 return;
484 }
485
486 //
487 // Now the error is handled by the hardware now it is the software part
488 // to react on it. The Error flag now is set to the correct value.
489 //
490 if (GetError()>0)
491 {
492 lout << GetNodeName() << ": WARNING! Error #" << GetError() << " unhandled (not cleared) by software." << endl;
493
494 //
495 // If the error is unhadled and/or not cleared, don't try it again.
496 //
497 if (GetError()==errnum)
498 return;
499 }
500
501 SetError(errnum);
502
503 lout << GetNodeName() << " reports: ";
504 switch (errnum)
505 {
506 case 3:
507 lout << "Axis does not existing." << endl;
508 return;
509 case 5:
510 lout << "Error not cleared (while trying to move axis)" << endl;
511 return;
512 case 6:
513 //
514 // Report the error to the user. All possible movements should have
515 // been stopped anyhow. Now delete the error to prevent the system
516 // from reporting this error a thousands of times.
517 //
518 lout << "Home position not the first positioning command." << endl;
519 SetError(0);
520 return;
521 case 8:
522 lout << "Control deviation overflow." << endl;
523 return;
524 case 9:
525 lout << "Zero index not found." << endl;
526 return;
527 case 10:
528 lout << "Unknown command, syntax error." << endl;
529 lout << "Please recompile and reload program." << endl;
530 return;
531 case 11:
532 case 25:
533 switch (errinf)
534 {
535 case -1:
536 lout << "Negative";
537 break;
538 case 1:
539 lout << "Positive";
540 break;
541 default:
542 lout << "-unknown-";
543 }
544 switch (errnum)
545 {
546 case 11:
547 lout << " software";
548 break;
549 case 25:
550 lout << " hardware";
551 break;
552 }
553 lout << " endswitch activated." << endl;
554 return;
555 case 12:
556 lout << "Wrong parameter number used in SET command." << endl;
557 return;
558 case 14:
559 lout << " Too many LOOP calls." << endl;
560 return;
561 case 16:
562 lout << "Parameter in EEPROM broken (means: EEPROM broken, or saving not finished)" << endl;
563 lout << "Please use APOSS to 'Reset' the MACS and reload the parameters." << endl;
564 return;
565 case 17:
566 lout << "Program in EEPROM broken (means: EEPROM broken, or saving not finished)" << endl;
567 lout << "Please use APOSS to delete all Programs restore the programs." << endl;
568 return;
569 case 18:
570 lout << "Reset by CPU (reset called by Watch-dog cause of CPU halted)" << endl;
571 lout << "Possible reasons: short under-/overvoltage or shortcut." << endl;
572 return;
573 case 19:
574 lout << "User break (autostart program stopped by user)" << endl;
575 return;
576 case 51:
577 lout << "Too many (>=10) GOSUB calls." << endl;
578 return;
579 case 52:
580 lout << "Too many RETURN calls." << endl;
581 return;
582 case 62:
583 lout << "Error veryfiing EEPROM after access (Try again savaing parameters or program)" << endl;
584 return;
585 case 70:
586 lout << "Error in DIM call (call to DIM doesn't fit existing DIM call)" << endl;
587 return;
588 case 71:
589 lout << "Array out of bound." << endl;
590 return;
591 case 79:
592 lout << "Timeout waiting for index (WAITNDX)." << endl;
593 return;
594 case 84:
595 lout << "Too many (>12) ON TIME calls." << endl;
596 return;
597 case 87:
598 lout << "Out of memory for variables - Check APOSS predifined number of" << endl;
599 lout << "variables and try deleting the array by doing a 'Reset' from APOSS." << endl;
600 return;
601 case 89:
602 lout << "CAN I/O error (REOPEN=" << dec << errinf << " " << (errinf==0?"OK":"ERR") << ")" << endl;
603 return;
604
605 case 100:
606 //lout << "Connection timed out." << endl;
607 //EnableTimeout(false);
608 return;
609
610 default:
611 lout << "Error Nr. " << errnum << ", " << errinf << endl;
612 }
613}
614
615void Macs::HandlePDO3(BYTE_t *data, timeval_t *tv)
616{
617 // 3 5 7 9
618 // 1100 1010 1110 1001
619 if (fStatusPdo3 == data[3])
620 return;
621
622 lout << GetNodeName() << ": Status PDO3 = ";
623 const Bool_t ready = data[3]&0x01;
624 const Bool_t fuse = data[3]&0x02;
625 const Bool_t emcy = data[3]&0x04;
626 const Bool_t vltg = data[3]&0x08;
627 const Bool_t mode = data[3]&0x10;
628 const Bool_t rf = data[3]&0x20;
629 const Bool_t brake = data[3]&0x40;
630 if (ready) lout << "DKC-Ready ";
631 if (fuse) lout << "FuseOk ";
632 if (emcy) lout << "EmcyOk ";
633 if (vltg) lout << "OvervoltOk ";
634 if (mode) lout << "SwitchToManualMode ";
635 if (rf) lout << "RF ";
636 if (brake) lout << "BrakeOpen ";
637 lout << endl;
638
639 fStatusPdo3 = data[3];
640}
641
642// FIXME? Handling of fIsZombie?
643void Macs::HandleError()
644{
645 //
646 // If there is no error we must not handle anything
647 //
648 if (!HasError())
649 return;
650
651 //
652 // If the program got into the: HandleError state before the hardware
653 // has finished handeling the error we have to wait for the hardware
654 // handeling the error
655 //
656 // FIXME: Timeout???
657 //
658// while (GetError()<0)
659// usleep(1);
660
661 //
662 // After this software and hardware should be in a state so that
663 // we can go on working 'as usual' Eg. Initialize a Display Update
664 //
665 cout << GetNodeName() << " Handling Error #" << dec << GetError() << endl;
666 switch (GetError())
667 {
668 case 6: // home
669 case 8: // control dev
670 case 9: // zero idx
671 case 84: // ON TIME
672 lout << "- " << GetNodeName() << ": Cannot handle error #" << GetError() << endl;
673 return;
674
675 case 11: // software endswitch
676 case 25: // hardware endswitch
677 lout << "- " << GetNodeName() << ": Cannot handle error 'Endswitch!'" << endl;
678 return;
679
680 case 100: // timeout (movement has been stopped, so we can go on)
681 DelError();
682 return;
683/*
684 case 101:
685 //lout << "Warning: " << GetNodeName() << " didn't respond in timeout window - try again." << endl;
686 DelError();
687 return;
688 */
689 default:
690 lout << "- " << GetNodeName() << ": Cannot handle error #" << GetError() << endl;
691
692 }
693}
694
695double Macs::GetTime()
696{
697 return fPosTime.Now();
698}
699
700double Macs::GetMjd()
701{
702 return fPosTime.GetMjd();
703}
704
705double Macs::GetPdoTime()
706{
707 return fPdoTime.Now();
708}
709
710double Macs::GetPdoMjd()
711{
712 return fPdoTime.GetMjd();
713}
714
715/* 0x2000 0 rw Maximum positioning error */
716/* 1 rw Negative Software Endswitch */
717/* 2 rw Positive Software Endswitch */
718void Macs::SetNegEndswitch(LWORDS_t val)
719{
720 SendSDO(0x2000, 1, (LWORD_t)val);
721 WaitForSdo(0x2000, 1);
722}
723
724void Macs::SetPosEndswitch(LWORDS_t val)
725{
726 SendSDO(0x2000, 2, (LWORD_t)val);
727 WaitForSdo(0x2000, 2);
728}
729
730void Macs::EnableEndswitches(bool neg, bool pos)
731{
732 SendSDO(0x2000, 3, (LWORD_t)(neg|(pos<<1)));
733 WaitForSdo(0x2000, 3);
734}
735
736void Macs::SendNodeguard()
737{
738 SendSDO(0x4000, 0, (LWORD_t)0, false);
739}
740
741// --------------------------------------------------------------------------
742//
743// This starts the host guarding. The host guarding is only available
744// if the node guarding is running. The host guarding works with the
745// guardtime and the lifetimefactor from the nodeguarding.
746//
747void Macs::StartHostGuarding()
748{
749 SendSDO(0x100c, 0, (LWORD_t)GetGuardTime());
750 WaitForSdo(0x100c);
751
752 SendSDO(0x100d, 0, (LWORD_t)GetLifeTimeFactor());
753 WaitForSdo(0x100d);
754
755 lout << "- " << GetNodeName() << ": Hostguarding started (" << dec;
756 lout << GetLifeTimeFactor() << "*" << GetGuardTime() << "ms)" << endl;
757}
758
759// --------------------------------------------------------------------------
760//
761// Stop the host guarding.
762//
763void Macs::StopHostGuarding()
764{
765 SendSDO(0x100c, 0, (LWORD_t)0);
766 WaitForSdo(0x100c);
767
768 SendSDO(0x100d, 0, (LWORD_t)0);
769 WaitForSdo(0x100d);
770
771 lout << "- " << GetNodeName() << ": Hostguarding stopped." << endl;
772}
773
Note: See TracBrowser for help on using the repository browser.