From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
12-07-2016 02:35 AM
Hello, all,
I'm encountering an error with a VISA Read. The output value(bytes read) of VI(Bytes at Port) is 32 bytes, but I only get 8 back (Return Count)? Anyone know what's happening? VISA Read block oddly enough does not return an error. Any ideas on how to debug this?
12-07-2016 02:36 AM
12-07-2016 02:59 AM
Hi, GerdW
You got it, After disabled enable terminate character (VISA configure serial port ), everything is working fine. Thank you.
Sort
12-07-2016 06:46 AM
So you understand what your current issue is, but I have to state that using the Bytes At Port to determine how many bytes to read is generally a bad practice when the instrument sends out ASCII data. Most instruments use that termination character to state when a message is complete. So you tell the VISA Read to read more bytes than a message will be and it will just return the message. You can then process that message, loop around and read the next message. With the Bytes At Port, you can get multiple messages, partial messages, and who knows what other message synchronizing issues.
12-07-2016 06:21 PM
12-09-2016 08:55 AM
Preventing LabVIEW from Continuously Polling the Serial Port,I used an event handling to improve program efficiency. It's looking work well. Share it with everyone. FYI.
12-09-2016 09:41 AM
While that might work this is the generally accepted way of handling serial communications.
VISA Read will read the serial port until it receives a termination character or times out
12-09-2016 10:11 AM
@sort897 wrote:
Preventing LabVIEW from Continuously Polling the Serial Port,I used an event handling to improve program efficiency. It's looking work well. Share it with everyone. FYI.
I do not like to use the events for VISA. Depending on how the instrument works, I will either use Bytes At Port to see if any data has come in and then use a Wait or something if there is no data or I will just use the Read and let the timeout tell me that the instrument is not sending anything.
I really need to get those nuggets done...
07-31-2017 08:17 PM
hello,sort897
I use the bled112
It is occuring a error Service: 1800 and Characteristic 2A00 were not found when connection the device
your help would be very nice.
thank you
08-01-2017 08:28 AM
I'm sorry, but your message is not very clear. What are "Service:1800" and "Characteristic 2A00"? And "bled112"?
So far, nothing you've posted sounds related to what this thread was originally about.
You should post a new message thread that includes details, and perhaps your VI.