Trying to get started with TCPIP programming - VMS

This is a discussion on Trying to get started with TCPIP programming - VMS ; We have gas analyzers that are interfaced via serial lines. The analyzers have the capability of communicating over ethernet using the same ascii protocol as for serial. I have the task of converting from serial to ethernet. But I don't ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: Trying to get started with TCPIP programming

  1. Trying to get started with TCPIP programming

    We have gas analyzers that are interfaced via serial lines. The
    analyzers have the capability of communicating over ethernet using the
    same ascii protocol as for serial.

    I have the task of converting from serial to ethernet. But I don't
    know the first thing about TCPIP programming.

    I am looking at tcpip$examples. I am using VMS 7.3.2.

    tcpip$udp_server_qio.c
    tcpip$udp_client_qio.c

    client_qio writes and server_qio reads.

    I could modify client to write a command to the analyzer.

    But I am not sure how to read back the response from the analyzer?

    Or could I use:

    tcpip$udp_server_sock.c
    tcpip$udp_client_sock.c

    I could modify client_sock to send and recieve from the analyzer, I
    guess.

    The analyzer uses port 9880.

    I am not sure how to send and recieve in the same program. None of
    the examples both send and recieve a message.


  2. Re: Trying to get started with TCPIP programming

    tadamsmar wrote:
    > We have gas analyzers that are interfaced via serial lines. The
    > analyzers have the capability of communicating over ethernet using the
    > same ascii protocol as for serial.
    >
    > I have the task of converting from serial to ethernet. But I don't
    > know the first thing about TCPIP programming.
    >
    > I am looking at tcpip$examples. I am using VMS 7.3.2.
    >
    > tcpip$udp_server_qio.c
    > tcpip$udp_client_qio.c
    >
    > client_qio writes and server_qio reads.
    >
    > I could modify client to write a command to the analyzer.
    >
    > But I am not sure how to read back the response from the analyzer?
    >
    > Or could I use:
    >
    > tcpip$udp_server_sock.c
    > tcpip$udp_client_sock.c
    >
    > I could modify client_sock to send and recieve from the analyzer, I
    > guess.
    >
    > The analyzer uses port 9880.
    >
    > I am not sure how to send and recieve in the same program. None of
    > the examples both send and recieve a message.
    >


    I've looked at the same "problem" lately.
    Replacing serial connected PLC's (through term-servers
    using TNS devices) with direct ethernet.

    I thought the examples (and the socket API programming
    manual) had good examples. As soon as you have an
    open socket you can read and write over it as you please.

    The main difference between the "client" examples and the
    "server" examples, is which end initiates the connection.
    As sson as the socket is there, there is not that much
    differences.

    Anyway, we decided to continue to use term-servers and
    RS232 connected PLC's for the time beeing...

    Jan-Erik.

  3. Re: Trying to get started with TCPIP programming

    On May 6, 5:26*pm, Jan-Erik Söderholm
    wrote:
    > tadamsmar wrote:
    > > We have gas analyzers that are interfaced via serial lines. *The
    > > analyzers have the capability of communicating over ethernet using the
    > > same ascii protocol as for serial.

    >
    > > I have the task of converting from serial to ethernet. *But I don't
    > > know the first thing about TCPIP programming.

    >
    > > I am looking at tcpip$examples. *I am using VMS 7.3.2.

    >
    > > tcpip$udp_server_qio.c
    > > tcpip$udp_client_qio.c

    >
    > > client_qio writes and server_qio reads.

    >
    > > I could modify client to write a command to the analyzer.

    >
    > > But I am not sure how to read back the response from the analyzer?

    >
    > > Or could I use:

    >
    > > tcpip$udp_server_sock.c
    > > tcpip$udp_client_sock.c

    >
    > > I could modify client_sock to send and recieve from the analyzer, I
    > > guess.

    >
    > > The analyzer uses port 9880.

    >
    > > I am not sure how to send and recieve in the same program. *None of
    > > the examples both send and recieve a message.

    >
    > I've looked at the same "problem" lately.
    > Replacing serial connected PLC's (through term-servers
    > using TNS devices) with direct ethernet.
    >
    > I thought the examples (and the socket API programming
    > manual) had good examples. As soon as you have an
    > open socket you can read and write over it as you please.
    >
    > The main difference between the "client" examples and the
    > "server" examples, is which end initiates the connection.
    > As sson as the socket is there, there is not that much
    > differences.
    >
    > Anyway, we decided to continue to use term-servers and
    > RS232 connected PLC's for the time beeing...
    >
    > Jan-Erik.- Hide quoted text -
    >
    > - Show quoted text -


    So, I guess the analyzer that I am trying to connect to has already
    initiated the socket, so it's like the server? It appears that the
    analyzer is just setting there ready to respond to commands sent to
    9880.

  4. Re: Trying to get started with TCPIP programming

    On 6 May, 22:08, tadamsmar wrote:
    > We have gas analyzers that are interfaced via serial lines. The
    > analyzers have the capability of communicating over ethernet using the
    > same ascii protocol as for serial.
    >
    > I have the task of converting from serial to ethernet. But I don't
    > know the first thing about TCPIP programming.
    >
    > I am looking at tcpip$examples. I am using VMS 7.3.2.
    >
    > tcpip$udp_server_qio.c
    > tcpip$udp_client_qio.c
    >
    > client_qio writes and server_qio reads.
    >
    > I could modify client to write a command to the analyzer.
    >
    > But I am not sure how to read back the response from the analyzer?
    >
    > Or could I use:
    >
    > tcpip$udp_server_sock.c
    > tcpip$udp_client_sock.c
    >
    > I could modify client_sock to send and recieve from the analyzer, I
    > guess.
    >
    > The analyzer uses port 9880.
    >
    > I am not sure how to send and recieve in the same program. None of
    > the examples both send and recieve a message.


    Firstly, you need to determine whether your analysers use TCP/IP or
    (as you imply) UDP. What make/model are they?

    I have used the ucx$tcp_server_ipc.c and ucx$tcp_client_ipc.c examples
    which use "standard" C functions send/recv etc. rather than QIOs as
    bases for many instrument communications programs. It's really just a
    matter of deciding whether you are client or server (I'd guess you are
    client) and then adding the code for the other direction into the
    example program.

    If it's TCP/IP and you are prepared to use the C functions (and
    assuming you aren't a competitor!), I can dig out some example code.
    Please e-mail me directly, as Google hides your e-mail address,

    Chris
    Instrument communications software engineer, ABB Switzerland (but not
    representing the company etc. etc.)

  5. Re: Trying to get started with TCPIP programming



    tadamsmar wrote:
    > We have gas analyzers that are interfaced via serial lines. The
    > analyzers have the capability of communicating over ethernet using the
    > same ascii protocol as for serial.
    >
    > I have the task of converting from serial to ethernet. But I don't
    > know the first thing about TCPIP programming.
    >
    > I am looking at tcpip$examples. I am using VMS 7.3.2.
    >
    > tcpip$udp_server_qio.c
    > tcpip$udp_client_qio.c
    >
    > client_qio writes and server_qio reads.
    >
    > I could modify client to write a command to the analyzer.
    >
    > But I am not sure how to read back the response from the analyzer?
    >
    > Or could I use:
    >
    > tcpip$udp_server_sock.c
    > tcpip$udp_client_sock.c
    >
    > I could modify client_sock to send and recieve from the analyzer, I
    > guess.
    >
    > The analyzer uses port 9880.
    >
    > I am not sure how to send and recieve in the same program. None of
    > the examples both send and recieve a message.
    >


    If the system responds to commands and gives an answer, Curl might work.

    Jeff C.
    www.digitalsynergyinc.com

+ Reply to Thread