etherlab/plc_cia402node.c
changeset 2082 caae3ad2d03b
parent 2079 49242019a9ca
child 2084 579af800b359
equal deleted inserted replaced
2081:b1801bf4365c 2082:caae3ad2d03b
   103 	if (__CIA402Node_%(location)s.state == __Unknown) {
   103 	if (__CIA402Node_%(location)s.state == __Unknown) {
   104 		return;
   104 		return;
   105 	}
   105 	}
   106 
   106 
   107 	__CIA402Node_%(location)s.axis->PowerFeedback = __CIA402Node_%(location)s.state == __OperationEnabled;
   107 	__CIA402Node_%(location)s.axis->PowerFeedback = __CIA402Node_%(location)s.state == __OperationEnabled;
   108 	__CIA402Node_%(location)s.axis->ActualPosition = (IEC_REAL)(*(__CIA402Node_%(location)s.ActualPosition)) * __CIA402Node_%(location)s.axis->RatioDenominator / __CIA402Node_%(location)s.axis->RatioNumerator;
   108 	__CIA402Node_%(location)s.axis->ActualPosition = (IEC_LREAL)(*(__CIA402Node_%(location)s.ActualPosition)) * __CIA402Node_%(location)s.axis->RatioDenominator / __CIA402Node_%(location)s.axis->RatioNumerator;
   109 }
   109 }
   110 
   110 
   111 void __publish_%(location)s()
   111 void __publish_%(location)s()
   112 {
   112 {
   113 	IEC_BOOL power = ((*(__CIA402Node_%(location)s.StatusWord) & __PowerMask) > 0) && __CIA402Node_%(location)s.axis->Power;
   113 	IEC_BOOL power = ((*(__CIA402Node_%(location)s.StatusWord) & __PowerMask) > 0) && __CIA402Node_%(location)s.axis->Power;