The print("MW0=" was fitting when reading the value of of a memory location. I don't believe it would be necessary anymore. You should probably replace it with something along the lines of 'Result of writing MW10 = '
WriteFlagValue(0,0 shows what byte, bit you want to write.
So it should be updated to WriteFlagValue(10,0
None))) at the is a pointer to the data that is to be written. You can try insterting an integer or something directly and see if it errors. The example below should write 47 to mw10
I would try something along the lines of:
print("Result of writing MW10 = "+str(prosim.WriteFlagValue(10,0,win32com.client.constants.S7_Word, 47)))
I tried but doesn't working
Error mssg:
File "D:\simooo\plc.py", line 9, in <module>
print("Result of writing MW10 = "+str(prosim.WriteFlagValue(0, 0, win32com.client.constants.S7_Word, 47)))
TypeError: WriteFlagValue() takes at most 4 arguments (5 given)