VAR
sendSt: STRING:='test';
empfSt:STRING;
send:BOOL;
empf:BOOL;
RS232: PcComControl;
RS232Send : SendString;
TrigSend: R_TRIG;
RS232Empf : ReceiveString;
END_VAR
VAR_INPUT
RS232InData AT %IB1100 : PCComInData;
RS232OutData AT %QB1100 : PCComOutData;
END_VAR
Trig_Send;
TrigSend.CLK:=send;
IF TrigSend.Q=TRUE
THEN
RS232(
COMin := RS232InData,
COMout := RS232OutData,
TxBuffer := TxBuffer,
RxBuffer := RxBuffer
);
RS232Send(SendString:=sendST'$0A', TxBuffer:=TxBuffer);
END_IF;
RS232(
RxBuffer := RxBuffer,
Suffix:='$0A',
ReceivedString := msg
);
IF RS232Empf.StringReceived= TRUE
THEN
empfSt:=ReceivedRS232.ReceivedString;
END_IF;
@Alle die dies Wissen: Wann macht es Sinn bei %I oder %Q Variablen Adressen anzugeben?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?