# HG changeset patch # User Laurent Bessard # Date 1351680866 -3600 # Node ID c0952932d74b311e57d148f0c1bd83a473948601 # Parent 8421bd1f8b064bc3849627fbf43629e05790d60e Adding support for using Etherlab SDO function blocks in MCL diff -r 8421bd1f8b06 -r c0952932d74b etherlab/etherlab.py --- a/etherlab/etherlab.py Tue Oct 30 00:22:29 2012 +0100 +++ b/etherlab/etherlab.py Wed Oct 31 11:54:26 2012 +0100 @@ -289,6 +289,7 @@ plc_cia402node_file.close() str_completion = { + "slave_pos": self.GetSlavePos(), "location": location_str, "MCL_headers": Headers, "extern_located_variables_declaration": [], diff -r 8421bd1f8b06 -r c0952932d74b etherlab/plc_cia402node.c --- a/etherlab/plc_cia402node.c Tue Oct 30 00:22:29 2012 +0100 +++ b/etherlab/plc_cia402node.c Wed Oct 31 11:54:26 2012 +0100 @@ -48,6 +48,7 @@ %(init_entry_variables)s *__IW%(location)s_0 = __MK_Alloc_AXIS_REF(); __CIA402Node_%(location)s.axis = __MK_GetPublic_AXIS_REF(*__IW%(location)s_0); + __MK_Set_AXIS_REF_Pos(*__IW%(location)s_0, %(slave_pos)d); *(__CIA402Node_%(location)s.ModesOfOperation) = 0x08; return 0; }