10-22-2008 08:42 AM
Hi, I wrote a VI to communicate via rs232 to query some temperature and current from a laser, and write the data to a text file. The VI works perfectly fine. everytime i run it, a new line of data beginning with the time stamp will be saved to the same file.txt. then i tried to build an exe, and try to run it, it only writes the current time stamp to the file but every other data (temp, current etc) are written blank.
So there's a problem with communicating with the rs232 to my device using .exe ? is there some option that i need to adjust? Since this is the first time building an exe for me.
i'm using version 8.0
thank you so much!
10-22-2008 09:03 AM
10-23-2008 02:35 AM
hello there,
For assurance, any paths of file to write to or VISA resrouce names are changed to constant. and yes, it is the same computer i'm using the exe on as my VI. so being constants should have no problem right?
10-23-2008 08:48 AM
10-23-2008 08:53 AM
10-23-2008 09:20 AM
10-23-2008 09:50 AM
10-23-2008 12:55 PM
northPIG87 wrote:
darn..why didn't i think of that -_-...thanks for the hint haha..i'll try it tomorrow morning when the lab is free....
smercurio_fc wrote:
... so my guess is that you don't have error handling.
10-24-2008 03:23 AM
Ok, i wired 10 error indicators to my read or write ....but it was no use...because my exe somehow worked this time! lol. strange.
but i have a new question, maybe i should post a new message..but might as well ask here: i'm using Cron.exe, a program that can execute files at desired time, to execute this laser recording vi's exe. The first time, the exe gets executed and the VI shows up and runs once and the data gets recorded...and the window stays open. The second time cron.exe tries to execute the same file, it just jumps to the vi screen but does not run it.
i guess it makes sense since the vi is already executed...
so is there a way, to make the vi close itself after being executed once?
10-24-2008 03:34 AM
Hi
Which com port are you using? If you start the program like that it looks like the visa will be initiated for COM1. Maybe you should let user pick com port first and after cliking OK button initialise connection with your device?
Best regars
Mikolaj