LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using Kernell32 to read command window


@MarkGreally wrote:

 

With regards to kernell32 and call library function is there any documentation or examples on how to interact with labview?


Read the comments to your other thread about this particular function. The documentation to kernel32 is on MSDN. The magic is to know enough C to make sense of that documentation. And then a little how to translate that into LabVIEW datatypes, but without any good C programming knowledge you are basically trying to do the same as if you were trying to build a house with no according education at all.

Rolf Kalbermatter
My Blog
Message 11 of 15
(1,426 Views)

I have gone with Sam's suggestion of using .net as it seems a bit more straight forward and will give me direct access to the console from within Labview. I have it almost working except for one thing. The console window requires text and then a carriage return. This will not work when I put the text followed by a CR. The both work as expected independantly but cannot do them both at the same time. Any ideas why this may be??

 

Mark.

0 Kudos
Message 12 of 15
(1,421 Views)
I can't open your VI as I'm on LV2014 but are you using the 'WriteLn' or the 'Write' .NET function to send your string to the console? WriteLn will automatically append a carriage return to your string.

LabVIEW Champion, CLA, CLED, CTD
(blog)
Message 13 of 15
(1,382 Views)

It turns out it was adding the CR and sending ccorrectly. I tried with some basic scripts and worked fine. The problem I have noticed is that if the scripts have delays or require user input they dont work in Labview for some reason. I just have a continuous stream an capture appropriately in Labview.

0 Kudos
Message 14 of 15
(1,361 Views)
Probably for a similar reason - if you're using the ReadLn function, it will pause executing until it sees a carriage return - try using the 'Read' function into a buffer instead - then it will just read all of the console characters that are available.

LabVIEW Champion, CLA, CLED, CTD
(blog)
Message 15 of 15
(1,355 Views)