Jump to content

123

Members
  • Posts

    3
  • Joined

  • Last visited

LabVIEW Information

  • Version
    LabVIEW 2015
  • Since
    2016

123's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. I tried oglib_pipe but not able to read the written data on command prompt.
  2. I have to develop one application to communicate with my hardware. I am running my C program code through command prompt and I have to read the data from command prompt at the same time when command prompt is running. Also I want to write on command prompt. I want to execute read & write function simultaneously. I tried one example for this (http://forums.ni.com/t5/LabVIEW/URGENT-How-we-read-stdout-directly/m-p/802382?view=by_date_ascending), but it’s not working properly for my purpose (due to copy paste concept used in it) It would be great if I get any help from anyone.
  3. Ton, How about using the following process, for controlling any third-party executable running on cmd prompt using WinAPIs: 1) Get the third party window handle by using GetWindowHandle API. 2) Use AttachConsole() API from kernel32.dll - This would make the third party console controllable through LabVIEW 3) Use GetConsoleScreenBufferInfo() from kernel32.dll, with which you can read the console information 4) Use another function (can't remember the function name) which would write to the console 5) Repeat Step 3 and read the output for the written command in step 4 (you might need to do some string parsing to get the desired output) 6) Use FreeConsole() function from kernel32 again, to free up the console at the end of the application. This way, you don't need to redevelop the third party app in labview, rather you could re-use the cmd prompt with this method with labview and have control/read data on it. I am planning to make a small example of this and post it very soon. -FraggerFox! FraggerFox, Did you make any example for this. If yes, it will be great if you share it.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.