10-30-2018 10:51 AM
Hi all,
I am reading out a vaccum pump status in LabView. It works in the VI itself when running it in Labview, but after building the application the communication fails. The main VI has two Sub-Vis for reading and writing the data which show up in the project as dependencies, but from the VISA instrument LIB only the Init VISA VI shows up as it is used in the main VI. I can't see the Read/Write SubVIs. Is this causing the problem?
Thanks
Ralf-Peter
10-30-2018 11:36 AM
Are you running the executable on the same computer as the source code? If not, then maybe you have not installed the NI-VISA drivers? Could you upload the part of your code that handles serial communication?
10-31-2018 05:28 AM
Hi Gregroyj,
the source code and the Executable are running on the same computer The system is Labview 2016. Is there maybe a problem with the Application builder trial license?
I have appended the VIs as ZIP file.
10-31-2018 06:53 AM
DO NOT USE THE BYTES AT PORT!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! (still not enough emphasis).
It appears that your instrument is using an ASCII protocol. So use that to your advantage. Any competent ASCII protocol uses a termination character to know when the message is complete. So turn on the termination character, set the termination character to what the instrument uses (based on your code, it is a Carriage Return, 0xD), and just tell the VISA Read to read more bytes than you ever expect in a message. The VISA Read will stop when that termination character is read and you now know you got the full message.
In your current setup, you are running into a race condition where you are trying to read before the full message is received and you are getting partial messages.
10-31-2018 06:55 AM
@Ralf-Peter wrote:
Hi Gregroyj,
the source code and the Executable are running on the same computer The system is Labview 2016. Is there maybe a problem with the Application builder trial license?
I have appended the VIs as ZIP file.
Use this project file, I hope it'll work.
10-31-2018 07:28 AM
Dear Sabari,
thanks for your reply but I can't open it as your LabView version is newer than LabView2016
11-02-2018 01:38 AM
Here go with LV 2016 version.
11-05-2018 08:43 AM
Hello Sabari,
thanks for your help. This version works well. So, where is the difference from my attempt?
I've been working with Labview since 1995, but never had an issue like this before so I'm very interested how to solve this.
Thanks
Ralf-Peter
11-12-2018 04:25 AM
@Ralf-Peter wrote:
Hello Sabari,
thanks for your help. This version works well. So, where is the difference from my attempt?
I've been working with Labview since 1995, but never had an issue like this before so I'm very interested how to solve this.
Thanks
Ralf-Peter
Do you installed NI-VISA driver?
Do you did it? >> While create an executable you've to add main VI under application properties>> source files>>startup VIs category.