We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
procedure TfrmMain.btnWriteClick(Sender: TObject); var iAmount: Integer; Data: array[0..4096] of Boolean; i: Integer; begin mctPLC.Host := edtIPAddress.Text; iAmount := StrToInt(edtReadAmount.Text);
if CheckBox1.Checked then Data[0] := True else Data[0] := False; if CheckBox2.Checked then Data[1] := True else Data[1] := False; if CheckBox3.Checked then Data[2] := True else Data[2] := False; if CheckBox4.Checked then Data[3] := True else Data[3] := False; if CheckBox5.Checked then Data[4] := True else Data[4] := False; if CheckBox6.Checked then Data[5] := True else Data[5] := False; if CheckBox7.Checked then Data[6] := True else Data[6] := False; if CheckBox8.Checked then Data[7] := True else Data[7] := False; if mctPLC.WriteCoils(StrToInt(edtWriteReg.Text), iAmount, Data) then Label6.Caption := 'PLC Write Success!' else Label6.Caption := 'PLC Write Not Success!';
But not success. What is the problem?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
procedure TfrmMain.btnWriteClick(Sender: TObject);
var iAmount: Integer; Data: array[0..4096] of Boolean; i: Integer;
begin
mctPLC.Host := edtIPAddress.Text;
iAmount := StrToInt(edtReadAmount.Text);
if CheckBox1.Checked then Data[0] := True else Data[0] := False;
if CheckBox2.Checked then Data[1] := True else Data[1] := False;
if CheckBox3.Checked then Data[2] := True else Data[2] := False;
if CheckBox4.Checked then Data[3] := True else Data[3] := False;
if CheckBox5.Checked then Data[4] := True else Data[4] := False;
if CheckBox6.Checked then Data[5] := True else Data[5] := False;
if CheckBox7.Checked then Data[6] := True else Data[6] := False;
if CheckBox8.Checked then Data[7] := True else Data[7] := False;
if mctPLC.WriteCoils(StrToInt(edtWriteReg.Text), iAmount, Data) then
Label6.Caption := 'PLC Write Success!' else Label6.Caption := 'PLC Write Not Success!';
But not success. What is the problem?
The text was updated successfully, but these errors were encountered: