LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

real time execution using system exec,vi

 

I could use some help.

I am capturing live data using system exec.vi as shown below. 

Can anyone tell me if there is a decent way to process the data as it is received?

My initial thought was to use "producer/consumer" principle but I am not sure how I would do under current circumstances.

Soren1974_0-1612392914428.png

Soren

0 Kudos
Message 1 of 8
(1,589 Views)

Your time limiting step is probably the system exe.

Can you explain what you mean by processing?

 

Your path and file cannot change during the loop, so why are you doing all these repeated steps over and over? You should use "build path" (outside the loop!) for the file IO and built the entire commandline. Shouldn't there be some delimiters? You need "path to string" for the commandline, but there is no need for "string to path". Is it reasonable to set the scroll position to the string size? How does the file look like?

 

What does the cmd do? Just update the file?

0 Kudos
Message 2 of 8
(1,560 Views)

Thank you for respond so quickly to my question.

Easy when you know how, right? I am obviously no an advanced user.

 

I am pulling IoT device data from an Azure iot hub with limited api access. The only option available to me at the moment is to use the CLI interface via system exec.vi to get the data. This is a slow process as I am pull the data from one device at a time. The azure command I have to use executes an infinite loop which system exec.vi is unable to return to me. This is why I have to write it to a file to get data. I then kill the CLI connection reopen it again ad start the process over for the next device.
I looked at running parallel executions and use multiple cores but have gotten nowhere with it.

So to sum it up. It is a cluster fu... but it is what it is at the moment.

Now the text file that the system exec.vi is writing to is updating and it allow me the access the vi did no. That is why I tried this loop solution.


So once again, any help is greatly appreciated.

 

Thanks

Soren

 

It is not a pretty solution but it is the closest I have as a test tool at the moment.

 

 

0 Kudos
Message 3 of 8
(1,550 Views)

Did you have any good suggestions to problem?

 

I have been trying to use the producer/consumer principle. It might work but I am now stuck parsing the data messages from the file in sequence and without loosing any data. 

 

 

0 Kudos
Message 4 of 8
(1,507 Views)

Have to you tried running Wireshark to see what is being sent to the device? Perhaps you could reverse engineer what the communication between th ecommand line app and the device is. If that is possible, you might be able to recreate that in LabVIEW directly eliminating the command line method.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 5 of 8
(1,504 Views)

I have not. Goof idea though. I will give it a shot.

thank you 🙂

0 Kudos
Message 6 of 8
(1,484 Views)

I was unable to derive useful data from Wireshark.

 

0 Kudos
Message 7 of 8
(1,470 Views)

Is there really nobody who has experienced this problem before and can suggest a solution?

It seems highly unlikely to me.

0 Kudos
Message 8 of 8
(1,469 Views)