09-13-2019 03:20 AM
Hi everyone,
I am trying to read out from a balzers TPG 300 Total pressure gauge and controller and had my VI working. But then the next day I start up my VI, it isn't able to read out any data. I checked if there still was connection (which there is). I already validated my setup with hyper terminal and NI MAX. And tested to write and read something in NI MAX. Which all works.
Now every time I run the VI I gives met the : time out run out error (BFFF0015). And I get this before I can read out some data. I hope one of you guys can help.
09-13-2019 04:24 AM
Input control has a label TCPIP, but I assume you have a RS232 connection?
Your problem sounds like reserved resource to me, what happens if you close the reference after use?
It is easily tested at least, I attached the code as LV2017 snippet.
09-13-2019 04:40 AM
thanks for your fast response
No it is a TCPIP connection, I closed the reference just as in your snipped but it still doesn't read out. There is just one thing I don't really understand from your snipped. What are the green (F) blue (0) and pink (empty) boxes next to the VISA open function?
I know my code is in LabView 2014, But I actually work in LabView 2009. But I can't upload from that pc.
09-13-2019 04:59 AM
The VISA open function has an error input, I added an error constant to it. That's the "green, blue and pink" cluster as a constant (instead of as control).
Now that you have an error handling, where do you get your error from? Is it still timeout error?
Another possibility, when you mention it is a TCPIP connection is that you have opened a connection, but your reference has gone stale. You can test that too, added a code as LV2017 snippet.
09-13-2019 01:29 PM - edited 09-13-2019 01:31 PM
First, you should add a Wait in your While loop. As written now your code could starve the CPU as it will run as fast as it possibly can if data were available. The read timeout is the only thing gating your while loop. Even a Wait 0 would be useful.
The other thing incorrect about your code is that the device only responds to commands. You are not sending it commands so there is no response from the device. You need to ask it for something. You also disabled the Termination character to terminate a read. I don't think that every response from the device is 66 characters long so you will most likely always get a timeout error. The device will always end the response with a carriage return line feed. You should use this to terminate your read requests.
Also, if you will always be using a network connection I would simply use the native TCP VIs to communicate with the device instead of VISA.
09-15-2019 08:36 PM
My tutor says the main station needs a reboot and that's why I can't read out any measured value's. This will be done this Wednesday (18/09/2019). I will keep you updated if it worked.