ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Call Library Node + Windows Console

I tried to run an example OpenG System Command Pipe test.vi

 

I've made a simple C console program:

 

#include <stdio.h>

int main() {

    int C;
    int f;
    C = 0;
    f = 0;
while(C != 115) {
   C = getchar();
}
while(C != 115) {
   f = getchar();
   }

 

}

 

And every time VI crashes with error.

I need LabView OG PIPE read - to wait until user presses an input and show it  Front Panel

 

What I might doing wrong?

 

 

 

0 Kudos
Message 11 of 22
(2,057 Views)

> Ok. I set up LabView 8.2.1 run-time engine and installed VIPM, but in a
list of available packages I don't see oglib_pipe. Is this library still in
alpha stage?

Yes, it's in permanent beta stage (it's not active anymore). It works fine
though, although I never can find it myself.

Anyway, for large data sets you'll need to make functions. I assumed that
the dll you have already uses functions to do this...

Soy, not very helpfull...

Regards,

Wiebe.


0 Kudos
Message 12 of 22
(2,055 Views)

> It works fine

 

Yes, I've checked. It works fine with getting output information from console, but what about User keyboard inputs?

 

 Regards

0 Kudos
Message 13 of 22
(2,048 Views)

And what is strange: 

 

Compiling this simple program to an .exe

and running "OpenG Command Pipe test.v" for it - returns this "bla bla bla text..." to LabView successfully - but also

shows error:  An input parameter is invalid

 

 

#include <stdio.h>

int main() {

printf("bla bla bla text...");

}

0 Kudos
Message 14 of 22
(2,045 Views)
//Solved this

 

 The only thing left - that I should every time restart my VI. The console opens only once. Then if I want to run it one more time - I need to close labview and then open VI again...

 

Have anyone deal with getting inputs from keyboard to OG Pipes ?
0 Kudos
Message 15 of 22
(2,040 Views)

"ACiDuser" <x@no.email> wrote in message
news:1226342404167-806516@exchange.ni.com...
> //Solved this &nbsp;&nbsp;The only thing left - that I should
> every time restart my VI. The console opens only once. Then if I want
> to run it one more time - I need to close labview and then open VI
> again...&nbsp;Have anyone deal with getting inputs from keyboard to OG
Pipes ?

Sure. You need to use the OpenG Write to Pipe.vi... I guess you've tried
that already. Have you looked at the PING Example?

Regards,

Wiebe


0 Kudos
Message 16 of 22
(2,010 Views)

Hi!

 

 Which exactly Ping example? I found this one:  http://forums.ni.com/attachments/ni/170/315317/1/ping.vi

It doesnt use any OpenG nodes.

 

I tried using OpenG Pipe example (by RolfK) , which is attached below. I get data from console window to LabView, but do not succeeded in writing data from LabView to the Console

And even this example uses only "stdout" and I need somehow get input from keyboard to LabView

 

Message Edited by ACiDuser on 11-13-2008 06:11 AM
0 Kudos
Message 17 of 22
(2,002 Views)
I thing you're using a different ogpipe library. I searched some more and
the one I'm talking about is downloadable here:

http://forums.ni.com/ni/board/message?board.id=170&message.id=138829#M138829

This one should have a PING example, that reads from and writes to ping.exe
through the command line.

I couldn't open your zip (it says it's corrupted)... Probably something
wrong on my side...

Regards,

Wiebe.


0 Kudos
Message 18 of 22
(1,998 Views)

Hi, ACiDuser,

 

Sorry for offtopic, but I follow this hard discussion with high interest... Its just interesting for me - what occurred first - you will get stuff running, or you will change the architecture a little bit for avoid such interconnection between LabVIEW and console... 🙂

Please don't hesitate to post here final solution when you will get it. Thanks.

 

Andrey.

 

0 Kudos
Message 19 of 22
(1,997 Views)

> I couldn't open your zip (it says it's corrupted)... Probably something
> wrong on my side...

 

try renaming *.zip to *.rar - it should be able to open

 

Regards

0 Kudos
Message 20 of 22
(1,993 Views)