Host Engineering Forum

General Category => Do-more CPUs and Do-more Designer Software => Topic started by: Antonio12345 on July 21, 2021, 09:16:22 PM

Title: TCP IP help
Post by: Antonio12345 on July 21, 2021, 09:16:22 PM
Hello,
I have an application where im using packetsender to send packets of data to Industrial PC, i have to send 2 messages within 1 sec apart
Is it posiible to use a do-more plc do do this? i have to send them to a specific ip address and port with tcp method.
see packet sender example below.



 
Title: Re: TCP IP help
Post by: BobO on July 22, 2021, 10:01:01 AM
Hello,
I have an application where im using packetsender to send packets of data to Industrial PC, i have to send 2 messages within 1 sec apart
Is it posiible to use a do-more plc do do this? i have to send them to a specific ip address and port with tcp method.
see packet sender example below.

Yes, easily.
Title: Re: TCP IP help
Post by: Antonio12345 on July 23, 2021, 08:24:36 AM
Hello BobO,

Should I use the streamout or pocketout instruction, attached is a copy of the small program,
Should I open a TCP connection every time I send something out?  and do i need to close the connection?
Thanks in advance.
Title: Re: TCP IP help
Post by: BobO on July 23, 2021, 12:51:59 PM
PACKETOUT is UDP, STREAMOUT is TCP.

You can keep the connection open and send more. When you are done sending, close the connection.
Title: Re: TCP IP help
Post by: Antonio12345 on July 23, 2021, 09:36:57 PM
Hi BobO,

Thanks for the help, I got it working now!!!!