07-26-2022 12:31 PM
I am trying to build a LabVIEW program to communicate with an Inrad Autotracker III. However I am completely new to serial communication and have not been able to find good resources telling me how to do it. Based on what I've seen online, I think the following code should be able to at least communicate with my instrument, but the VISA read is never able to return a signal and usually just times out.
The manual for the instrument doesn't have alot of information in it but I've included pictures to be helpful.
Any help would be appreciated, because I am quite lost in figuring out how to communicate with this device.
07-26-2022 01:09 PM
1. The number of bytes you wrote should not be the number of bytes you want to read. Instead, just tell the VISA Read to read more bytes than you ever expect in a message. I tend to use 50 or 100.
2. Your settings are wrong. You need to set the Parity to "even" and the Data Bits to 7. The rest of the settings for the VISA Configure Serial Port should be left unwired as the defaults should work.
3. Go watch this video: VIWeek 2020/Proper way to communicate over serial
07-26-2022 01:52 PM
Thanks for the video suggestion. Here are the changes that I made, but I am still getting an error out of the VISA read command.
08-08-2022 07:38 AM
Hi,
Adding a time delay somewhere in the block diagram does not do what you want.
You never know when this is executed (most times at the wrong moment) Look at it with highlight execution on.
You must use the dataflow to force the delay at the right moment. See screenshot.
What is the protocol of the device saying about the return data. You are better of using a termination character or a known number of bytes returned.
Kees