Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Sending data across network

0 views
Skip to first unread message

Servizio Tecnico

unread,
Jun 15, 2000, 3:00:00 AM6/15/00
to
Hi,
anybody know the API to send and receive a string from PC to another across
the network.

For example:

my PC is 120.120.120.1 and another PC is 198.222.234.4. I must send the
string "Hello" from my PC to second and wait the acknowledgement.


Have you a simple source?
Thanks in advance.
Roberto

donald tees

unread,
Jun 15, 2000, 3:00:00 AM6/15/00
to
By far the easiest way to do this is to write it to a file on a server, and
then read it on the other machine.

Servizio Tecnico wrote in message <8ia2sp$p06$1...@news.mclink.it>...

Ken Mullins

unread,
Jun 15, 2000, 3:00:00 AM6/15/00
to
look into using a socket or pipe...

kenmullins


"Servizio Tecnico" <soft...@gescart.com> wrote in message
news:8ia2sp$p06$1...@news.mclink.it...

Servizio Tecnico

unread,
Jun 15, 2000, 3:00:00 AM6/15/00
to
This way is not possible because inside the other PC (sorry PLC!) another
program wait my call with a propetary ASCII protocol (like
L001;A,12,12,<checksum>x"0d").


"donald tees" <don...@willmack.com> ha scritto nel messaggio
news:8iafsp$qok$1...@news.igs.net...


> By far the easiest way to do this is to write it to a file on a server,
and
> then read it on the other machine.
>
> Servizio Tecnico wrote in message <8ia2sp$p06$1...@news.mclink.it>...

Thane Hubbell

unread,
Jun 15, 2000, 3:00:00 AM6/15/00
to
http://www.geocities.com/Eureka/2006/sockets.zip


On Thu, 15 Jun 2000 10:28:34 +0200, "Servizio Tecnico"
<soft...@gescart.com> wrote:

>Hi,
>anybody know the API to send and receive a string from PC to another across
>the network.
>
>For example:
>
>my PC is 120.120.120.1 and another PC is 198.222.234.4. I must send the
>string "Hello" from my PC to second and wait the acknowledgement.
>
>
>Have you a simple source?
>Thanks in advance.
>Roberto
>
>

---
Try a better search engine: http://www.google.com
My personal web site: http://www.geocities.com/Eureka/2006/

donald tees

unread,
Jun 15, 2000, 3:00:00 AM6/15/00
to
Most PLC communication is done through RS-232-C interfaces. Looking at the
convention that you state, I suspect that is true here as well. If that is
the case, then you need a serial I/O library. Is it?

Servizio Tecnico wrote in message <8iak5p$1sh$1...@news.mclink.it>...


>This way is not possible because inside the other PC (sorry PLC!) another
>program wait my call with a propetary ASCII protocol (like
>L001;A,12,12,<checksum>x"0d").
>
>
>"donald tees" <don...@willmack.com> ha scritto nel messaggio
>news:8iafsp$qok$1...@news.igs.net...
>> By far the easiest way to do this is to write it to a file on a server,
>and
>> then read it on the other machine.
>>
>> Servizio Tecnico wrote in message <8ia2sp$p06$1...@news.mclink.it>...

Servizio Tecnico

unread,
Jun 15, 2000, 3:00:00 AM6/15/00
to
Yes is true for the rs232 communication but this PLC is particular. The PLC
is connected with a converter RS232-TCP/IP because the installation is done
over 15 metres (limit of RS232) from the PC.
The converter is like a client with IP address (xxx.xxx.xxx.xxx) in front of
PC and a NullModem in front of PLC.

With the PING command I see the converter but I don't know the API to
communicate.
Roberto.

"donald tees" <don...@willmack.com> ha scritto nel messaggio

news:8iaspb$6t0$1...@news.igs.net...

donald tees

unread,
Jun 15, 2000, 3:00:00 AM6/15/00
to
mmm. I am afraid I cannot help you much, then. Probably someone else in
the group can give you the correct API call. I would be tempted, if the
original code worked (sounds like a conversion) to get two of them, and
stick one on the back of the PC as well. Dirty, but would get existing code
working in a day.

How do you get the IP address set up? Device supplied software? The
supplier of than code may provide a subroutine library that would be easier
to use, since even after you get the correct API call you are still going to
be faced with protocol matching.

Servizio Tecnico wrote in message <8ib04h$6kr$1...@news.mclink.it>...

Ralph Wade Phillips

unread,
Jun 15, 2000, 3:00:00 AM6/15/00
to
Howdy!

Servizio Tecnico wrote in message <8ib04h$6kr$1...@news.mclink.it>...
>Yes is true for the rs232 communication but this PLC is particular. The PLC
>is connected with a converter RS232-TCP/IP because the installation is done
>over 15 metres (limit of RS232) from the PC.


OTOH, you CAN use either a line driver, or even a pair of modems
back-to-back to extend past 15 metres (line drivers are available for up to
3 miles at 9600bps ... )

Would be much easier, I would bet.

RwP


Ken Mullins

unread,
Jun 15, 2000, 3:00:00 AM6/15/00
to
What is a PLC?

kenmullins

"Ralph Wade Phillips" <ral...@techie.com> wrote in message
news:Fw7Ir...@news.boeing.com...

donald tees

unread,
Jun 15, 2000, 3:00:00 AM6/15/00
to

Ralph Wade Phillips wrote in message ...

>Howdy!
>
>Servizio Tecnico wrote in message <8ib04h$6kr$1...@news.mclink.it>...
>>Yes is true for the rs232 communication but this PLC is particular. The
PLC
>>is connected with a converter RS232-TCP/IP because the installation is
done
>>over 15 metres (limit of RS232) from the PC.
>
>
> OTOH, you CAN use either a line driver, or even a pair of modems
>back-to-back to extend past 15 metres (line drivers are available for up to
>3 miles at 9600bps ... )
>
> Would be much easier, I would bet.
>
> RwP

The line length limits on RS-232-C are also baud rate dependent, as the
primary problem is line capacitance. The 15 meter limit is at 19,200 baud,
lines well shielded. At 1200 baud, I have driven RS-232 800 metres with
no problem.


donald tees

unread,
Jun 15, 2000, 3:00:00 AM6/15/00
to
A PLC is a programmable logic controller. It is used to replace relay
driven logic at the plant level. The normal design for industrial equipment
(like a large asphalt plant for example), is PC to PLC, then the PLC is
interfaced to the actual push buttons, motors, etc.

A PLC normally has I/O that conforms to standard wiring, so you can just
hook in a 660 volt motor starter, for example. The same thing is true for
various industrial meters and flow control valves, etc.

Programming one is done by ladder diagrams, almost like programming the old
patch boards for unit record equipment, but done on a screen. The program
is then flash blasted into ROM of some sort. Communication to a computer is
normally via a serial port, often the same one that you connect a PC to for
programming.

The effect of the entire PLC is to provide manual backup for the system, as
well as a complete industrial interface subsystem. Years ago, when I first
started in this industry, those functions were provided for by huge banks of
industrial relays. The PLC gives you a programmable firmware equivalent.

To run the entire thing by computer, you then ask the PLC to "turn on" a
motor. The PLC internal programming functions as the equivalent of a
dedicated channel controller, and ensures that you cannot override safety
requirements, for example. (a nice feature, BTW. Before the damned things
were invented, I once managed to get into an infinite loop that *filled* a
truck with the entire contents of a 250,000 ton silo of stone. We had to
dig it out with a front end loader. Even though I did ask the driver to get
out before the test, I was razzed about that for years)

Ken Mullins <**Ken**Mullins**@**mindspring.com** remove **'s> > wrote in
message <8ib7d8$4mm$1...@slb2.atl.mindspring.net>...


>What is a PLC?
>
>kenmullins
>
>"Ralph Wade Phillips" <ral...@techie.com> wrote in message
>news:Fw7Ir...@news.boeing.com...

Ralph Wade Phillips

unread,
Jun 15, 2000, 3:00:00 AM6/15/00
to
Howdy!

Ken Mullins <**Ken**Mullins**@**mindspring.com** remove **'s> > wrote in
message <8ib7d8$4mm$1...@slb2.atl.mindspring.net>...
>What is a PLC?
>


Programmable Logic Controller.

RwP


Ken Foskey

unread,
Jun 15, 2000, 3:00:00 AM6/15/00
to
Servizio Tecnico wrote:
>
> Hi,
> anybody know the API to send and receive a string from PC to another
> across the network.
>
> For example:
>
> my PC is 120.120.120.1 and another PC is 198.222.234.4. I must send the
> string "Hello" from my PC to second and wait the acknowledgement.
>
> Have you a simple source?
> Thanks in advance.
> Roberto

Look up sockets. Thane has some cobol examples on his site from
memory.

One PC accepts the socket (server) and the other creates the link
using sockets (client).

Thanks
Ken Foskey
http://www.zipworld.com.au/~waratah/

For fast secure document delivery on the Net
http://www.themailxchange.com.au/

Ken Foskey

unread,
Jun 16, 2000, 3:00:00 AM6/16/00
to donald tees
> To run the entire thing by computer, you then ask the PLC to "turn on" a
> motor. The PLC internal programming functions as the equivalent of a
> dedicated channel controller, and ensures that you cannot override safety
> requirements, for example. (a nice feature, BTW. Before the damned things
> were invented, I once managed to get into an infinite loop that *filled* a
> truck with the entire contents of a 250,000 ton silo of stone. We had to
> dig it out with a front end loader. Even though I did ask the driver to get
> out before the test, I was razzed about that for years)

I must store this as the funniest bug I have ever heard :-}

James J. Gavan

unread,
Jun 16, 2000, 3:00:00 AM6/16/00
to

Ken Foskey wrote:
>
> > To run the entire thing by computer, you then ask the PLC to "turn on" a
> > motor. The PLC internal programming functions as the equivalent of a
> > dedicated channel controller, and ensures that you cannot override safety
> > requirements, for example. (a nice feature, BTW. Before the damned things
> > were invented, I once managed to get into an infinite loop that *filled* a
> > truck with the entire contents of a 250,000 ton silo of stone. We had to
> > dig it out with a front end loader. Even though I did ask the driver to get
> > out before the test, I was razzed about that for years)
>
> I must store this as the funniest bug I have ever heard :-}
>

I agree. One omission by Don, he forgot to mention he was probably
'stoned'. <G>

Jimmy

donald tees

unread,
Jun 16, 2000, 3:00:00 AM6/16/00
to
You should have seen me trying to stop the thing. I had designed the system
with a big panic switch, which, when hit, was supposed to cut power to the
interface. The pneumatic controls would then automatically shut the gate,
and stop material movement. I hit the panic button, and some sonofabitch
had disconnected it. So I raced to the fuse box. The fuse room was locked.
The pile was getting higher. I cut power to the computer (I was debugging
PROMS). Nothing, the relay was latched on. I was running up and down
stairs, trying to find a key when the last rock emptied out of the silo.
Panic city. You think a runaway printout is a problem ...


Ken Foskey wrote in message <39496F4A...@zip.com.au>...


>> To run the entire thing by computer, you then ask the PLC to "turn on" a
>> motor. The PLC internal programming functions as the equivalent of a
>> dedicated channel controller, and ensures that you cannot override safety
>> requirements, for example. (a nice feature, BTW. Before the damned things
>> were invented, I once managed to get into an infinite loop that *filled*
a
>> truck with the entire contents of a 250,000 ton silo of stone. We had to
>> dig it out with a front end loader. Even though I did ask the driver to
get
>> out before the test, I was razzed about that for years)
>
>I must store this as the funniest bug I have ever heard :-}
>

donald tees

unread,
Jun 16, 2000, 3:00:00 AM6/16/00
to

James J. Gavan wrote in message <39497261...@home.com>...

>
>
>Ken Foskey wrote:
>>
>> > To run the entire thing by computer, you then ask the PLC to "turn on"
a
>> > motor. The PLC internal programming functions as the equivalent of a
>> > dedicated channel controller, and ensures that you cannot override
safety
>> > requirements, for example. (a nice feature, BTW. Before the damned
things
>> > were invented, I once managed to get into an infinite loop that
*filled* a
>> > truck with the entire contents of a 250,000 ton silo of stone. We had
to
>> > dig it out with a front end loader. Even though I did ask the driver
to get
>> > out before the test, I was razzed about that for years)
>>
>> I must store this as the funniest bug I have ever heard :-}
>>
>I agree. One omission by Don, he forgot to mention he was probably
>'stoned'. <G>
>
>Jimmy

Nope, Not a chance. Although a died-in-the-wool stoner, I cannot program
stoned. It affects short term memory too much, so I never even try to work
stoned, though I could as I am my own boss.

I have found, that I often get valuable insights when stoned, and often will
light a doobie in the evening to consider a problem, and often come up with
new algorithms then. However, I always wait until the next day to try to
code.


0 new messages