From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
12-08-2021 08:18 PM
My senior design group is using a labview program that draws data from an impact hammer and accelerometer plugged into a digital ICP signal conditioner. The code works as expected when running in labview, but when we try to save the program as an executable and run it on a different computer (or the same one) it does not gather any data at all when we press run. There are 2 sub VI's that were included in the executable, 485B39 (signal conditioner code) and counts to V. What could be the reason that no data is being collected in the executable?
12-08-2021 10:19 PM
Let me see if I get your situation:
There is a Reasonable Next Step for you to take. You might also provide more details on the signal conditioner, and the code associated with it.
Bob Schor
12-09-2021 04:35 AM
When you say it's not collecting data, does it in fact connect?
The problem could be anything, from the hardware isn't connected to a subVI dynamically loads a VI that is not included.
Any error? (You'd need to handle the errors, with a dialog or indicator).
12-09-2021 11:30 AM
A partial screen shot that doesn't show all of your code. I'm going to assume there isn't anything to the left of the picture, and nothing substantial above or below it. To be sure, is there any other while loop outside of that screen we can't see?
I'm going to assume there isn't. The issue I see is that you have an acquire button that is far to the left and will be read exactly one time when the VI starts. It is probably false. Even if you press it again, the code inside the loops will never see the change because the control is not read again.
It works in development because when the VI is not running, you can press the button, then if you press the Run button, it will read it as True. It won't work in an executable because the program will start running immediately.
These are all basic LabVIEW dataflow principles I suggest that you review again.
Otherwise, please attach the actual VI so we can look at all of your code in the event the stuff not shown in the picture affects things.
12-09-2021 02:17 PM
I have attached the main VI and sub VI's to this comment. The 485B39 recognizes the signal conditioner. The code works fine when run on the labview .vi, but I saved the labview as a .exe file (NI will not let me upload this file here) and no data is being collected when I run the program. No error is displayed on the .exe file, and when I press stop and press run again it continues to not display any data.
My goal is to plug in the same equipment to a computer running the .exe file (which does not have labview installed) and get the same data I would on the .vi file.
12-10-2021 02:59 AM
I'm going to have a stab from the initial screen shot and not look at the code.
I suspect the Device ID (Read once on Main VI load before the subVI and while loop) is not set to a default value and is wrong on the target PC so you never connect so nothing happens.
James
12-10-2021 03:02 AM
@Daniel_UNCC wrote:
, but I saved the labview as a .exe file (NI will not let me upload this file here) and no data is being collected when I run the program.
But does it connect to the device?
You're telling us what doesn't work. You need to tell us the first thing that doesn't work (or does work). Exactly.
You have a VI before the loop, that should show different results if it connects or not. Does something show up in "485B39 Information"?
This is important to find your problem.
If it does connect, but doesn't get data, something in the loop is the problem.
If it doesn't connect at all, it could be a physical (cable, port, etc), driver, OS, firewall, address, or user rights problem. Or something else. There might be nothing wrong with the program.
12-10-2021 03:03 AM - edited 12-10-2021 03:06 AM
@Daniel_UNCC wrote:
No error is displayed on the .exe file, and when I press stop and press run again it continues to not display any data.
I'd expect no error to pop up, unless you've added a (simple) error handler or error indicator... This would only show errors if the error isn't cleared anywhere in the code.
12-10-2021 03:12 AM
wiebe@CARYA wrote:
@Daniel_UNCC wrote:
, but I saved the labview as a .exe file (NI will not let me upload this file here) and no data is being collected when I run the program.
But does it connect to the device?
You're telling us what doesn't work. You need to tell us the first thing that doesn't work (or does work). Exactly.
You have a VI before the loop, that should show different results if it connects or not. Does something show up in "485B39 Information"?
This is important to find your problem.
If it does connect, but doesn't get data, something in the loop is the problem.
If it doesn't connect at all, it could be a physical (cable, port, etc), driver, OS, firewall, address, or user rights problem. Or something else. There might be nothing wrong with the program.
@wiebe - you've missed the subtle difference between setting the value of the Device ID control value in the dev environment before clicking run and running an exe here, It might be a cable, but it's more likely just param not set at runtime when VI launched 😉 if no information. (And device IDs change between PCs so easily.)
James
12-10-2021 04:07 AM
@James_W wrote:
wiebe@CARYA wrote:
@Daniel_UNCC wrote:
, but I saved the labview as a .exe file (NI will not let me upload this file here) and no data is being collected when I run the program.
But does it connect to the device?
You're telling us what doesn't work. You need to tell us the first thing that doesn't work (or does work). Exactly.
You have a VI before the loop, that should show different results if it connects or not. Does something show up in "485B39 Information"?
This is important to find your problem.
If it does connect, but doesn't get data, something in the loop is the problem.
If it doesn't connect at all, it could be a physical (cable, port, etc), driver, OS, firewall, address, or user rights problem. Or something else. There might be nothing wrong with the program.
@wiebe - you've missed the subtle difference between setting the value of the Device ID control value in the dev environment before clicking run and running an exe here, It might be a cable, but it's more likely just param not set at runtime when VI launched 😉 if no information. (And device IDs change between PCs so easily.)
No, I didn't. Your message crossed mine, yours wasn't there when I typed mine. Otherwise I would have rephrased mine.
I did explicitly mention the wrong address as a potential problem. Not setting the default is just a cause of using the wrong address.