Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks,
I am working with win32::serialport.
Is there any way to send commands one after the other i.e.
Application should wait until my first command is processed and after receiving the data from the port then it should send the second command and so on.

Replies are listed 'Best First'.
Re: struck up with win32::Serialport
by ikegami (Patriarch) on Oct 30, 2008 at 04:14 UTC

    It can do what you said, except "wait until after receiving" is called "reading".

    1. Send a command.
    2. Read until you have a complete reply.
    3. Process reply.
    4. Repeat.

    What's the problem?

    By the way, do you mean Win32::SerialPort? I can't find any module named win32::Serialport.

Re: struck up with win32::Serialport
by GrandFather (Saint) on Oct 30, 2008 at 04:20 UTC

    Isn't that what one would normally do? Maybe you need to show us a little code so we can see what you are trying to do?


    Perl reduces RSI - it saves typing