CP340

SIMATIC S7-200/300/400, Step7, PCS7, CFC, SFC, PDM, PLCSIM,
SCL, Graph, SPS-VISU S5/S7, IBHsoftec, LOGO ...
Post Reply
Darko7

CP340

Post by Darko7 » Wed May 31, 2006 6:51 am

Hi,
I use CP340 module with CPU312C. How to realize signal REQ, when using P_SEND command to send data from CP340 module. I program in S7 SCL v5.3.Can you write me short sequence.I use P_SEND in FB.Thanks

JuhaHiukka,MSe

REQ

Post by JuhaHiukka,MSe » Wed May 31, 2006 1:07 pm

Hi,

I programmed many systems used CP340, i do not understanding you question.

You will able to genarate boolean trigger signal for REQ (start sending)?
I think is better to send better specifical informarmation about your
solution.

The signal REG you generate directli from your user program or from HMI.
My example is:

Calling form:

P_Send.DB_FB(REQ := AnyDB.Tx.Request,
R := AnyDB.TX.Reset,
LADDR := MI_IO_Address,
DB_NO := MI_BfrBlockNr,
DBB_NO := 100,
LEN := 10
);

You can connect for example to predefined toggled Merker (in HW config will make 1s toggle )

AnyDB.Tx.Request := M0.5;

And after this connection your send data repeated cyclically each 1s.

Best regards JH

Darko7

Thanks

Post by Darko7 » Thu Jun 01, 2006 7:22 am

Thanks,
Here is my problem. I need to communicate with one measurements board via CP340 RS232.I need to make FB which send command to board via RS232 (12 characters) and wait for receive answer (16 characters). I use P_SEND and P_RCV.But I dont have any external connection to PLC inputs DI..., and I need to make software triggering of Send_REQ signal, no via some external signal. Can I use for example: Send_REQ:=0 and than make delay 5ms and change to Send_REQ:=1?If you can write me procedure for this and how to to wait for answer with P_RCV. I hope that now you understand me. Just send command and receive answer, and I see resul in DB.Thanks a lot.
Best regards,
Darko

Post Reply