boswellw
Member
I am currently converting a relay-based control panel to an S7-200 PLC. Everything is done, apart from the "Start" button. I need to write a value to the PLC from the button, i.e. When the "Start" button is clicked, I need to write the value of 1 to M0.2 (Start_Dedusting). When it is clicked again, I need to write the value of zero to it.
I have written a small C-Script to do this, but I am fairly sure this is incorrect.
GetTagBit("Start_Dedusting,0)
if ("Start_Dedusting,1)
SetTagBit("Start_Dedusting,1)
else
SetTagBit("Start_Dedusting,0)
The main body of it is above. The header was automatically created. I haven't tested it yet, but I'm fairly sure this is incorrect.
Can anyone tell me whether I'm on the right track or not?
Cheers.
I have written a small C-Script to do this, but I am fairly sure this is incorrect.
GetTagBit("Start_Dedusting,0)
if ("Start_Dedusting,1)
SetTagBit("Start_Dedusting,1)
else
SetTagBit("Start_Dedusting,0)
The main body of it is above. The header was automatically created. I haven't tested it yet, but I'm fairly sure this is incorrect.
Can anyone tell me whether I'm on the right track or not?
Cheers.