partial wrote:Thank you for your reply.
Searching for drivers was one of the first steps I did. But unfortunately my device is so old (about 25 years) that there is no driver. I also tried to work with the programs of the LabVIEW LLB which are available from your link, but there I also get the 1073807339 error code.
Checking the cabling is for sure a good idea. So far it seems to be fine.
Thank you for your hint that the use of delays and the Bytes at Serial Port is incorrect.
But why is Bytes at Port then mentioned in this NI-document:
http://digital.ni.com/public.nsf/allkb/874B379E24C0A0D686256FCF007A6EA0
There they also mention the delay which should be used for older instruments. Since my device is about 25 years old, I thought that the use of wait is a good idea.
But perhaps you are right. So, could you please correct my program then? As I mentioned, I have never worked so far with the RS232 interface, so I really would be glad if somebody corrects my code.
Unfortunately, what NI doesn't tell you is that "Bytes at Serial Port" is a last resort, to be used only if you have no other way to figure out if a device has completed sending data. Since you have a marker - the line feed termination character - I would configure the VISA serial port to use it, and then discard the white space (the CR) at the end. That way you read exactly the data and don't have to insert a wait to make sure everything was read.
IMHO - If you have to insert a "wait" in between commands, you probably don't fully understand how to communicate with the equipment. Of course, I have worked with power supplies that are so "dumb" that the programming guide says that you have to wait x milliseconds for a command to process!