732 pos = read_from.getPosition() |
732 pos = read_from.getPosition() |
733 index = read_from.getIndex() |
733 index = read_from.getIndex() |
734 subindex = read_from.getSubIndex() |
734 subindex = read_from.getSubIndex() |
735 location = current_location + (idx, ) |
735 location = current_location + (idx, ) |
736 var_type = self.GetSlaveVariableDataType(pos, index, subindex) |
736 var_type = self.GetSlaveVariableDataType(pos, index, subindex) |
737 name = self.FileGenerator.DeclareVariable( |
737 name = self.FileGenerator.DeclareVariable(pos, index, subindex, |
738 pos, index, subindex, var_type, "I", |
738 var_type, "I", |
739 self.GetProcessVariableName(location, var_type)) |
739 self.GetProcessVariableName(location, var_type)) |
740 if write_to is not None: |
740 if write_to is not None: |
741 pos = write_to.getPosition() |
741 pos = write_to.getPosition() |
742 index = write_to.getIndex() |
742 index = write_to.getIndex() |
743 subindex = write_to.getSubIndex() |
743 subindex = write_to.getSubIndex() |
744 if name is None: |
744 if name is None: |
745 location = current_location + (idx, ) |
745 location = current_location + (idx, ) |
746 var_type = self.GetSlaveVariableDataType(pos, index, subindex) |
746 var_type = self.GetSlaveVariableDataType(pos, index, subindex) |
747 name = self.GetProcessVariableName(location, var_type) |
747 name = self.GetProcessVariableName(location, var_type) |
748 self.FileGenerator.DeclareVariable( |
748 self.FileGenerator.DeclareVariable(pos, index, subindex, var_type, "Q", name, True) |
749 pos, index, subindex, var_type, "Q", name, True) |
|
750 |
749 |
751 self.FileGenerator.GenerateCFile(Gen_Ethercatfile_path, location_str, self.BaseParams.getIEC_Channel()) |
750 self.FileGenerator.GenerateCFile(Gen_Ethercatfile_path, location_str, self.BaseParams.getIEC_Channel()) |
752 |
751 |
753 LocationCFilesAndCFLAGS.insert( |
752 LocationCFilesAndCFLAGS.insert( |
754 0, |
753 0, |