02-19-2018 08:22 AM
Hi guys,
I have a problem in System Exec vi and would be appreciated if anyone can suggest a solution.
So I use SystemExec vi to load an application called CANopenshell.exe and send a command over a CAN a line. My problem is, the command gets repeatedly sent until I close the terminal manually! Is any one able to tell why that happens? Command has been given as Standard Input. Please see attached images, as you'd see that, the output, "Write PDO......etc" section has been repeated many times.
Also, how would I be able to send commands one by one ?
(Sorry, I had to take some data/parameters off)
Thanks in advance.
02-20-2018 04:15 PM
This code snippet isn't in a while loop is it? What happens if you include an end of line character in your command?
02-20-2018 04:55 PM
Hi Ch,
No it’s not a loop. I tried the End of line character,didn’t work. Same result.
02-22-2018 12:46 AM
Update -
Although I haven't been able to find the cause of the problem I had before, I have managed to work around the issue and come up with a solution.
Basically, I had to use "LV Processes" to feed in multiple commands to the terminal and read stdouts accordingly. System Exec VI can't really handle multiple interactive commands from what I understand. Follow the below link to find the necessary information, huge credit to the creator of this project. !
https://forums.ni.com/t5/Community-Documents/LV-Process-Windows-pipes-LabVIEW/ta-p/3497836