04-04-2019 08:49 AM
No. I can't. Because there are plenty of examples already out there. Search NI Help, Find Examples. Producer/Consumer. Search the forums.
04-04-2019 10:03 AM - edited 04-04-2019 10:14 AM
Running VI error like that, I do not know why
it seems to be missing
04-04-2019 08:56 PM - edited 04-04-2019 08:58 PM
Because you didn't read what I wrote in message 3 and elaborated on in message 6.
Let me use capital letters like I usually do. DON'T USE BYTES AT PORT!
You have an incomplete message. You checked if bytes at port are greater than 0. Well if only a few came in, it is greater than 0. Then you proceed to read that many bytes. Guess what? Incomplete message, and data that doesn't fit the format string! Error 85.
Reread the last paragraph of message 6 "If you have a small while loop that continually reads bytes at port to determine when a message starts (Bytes at Port >0), then you can stop the while loop and proceed to a VISA Read where you read a specific number of bytes (not the value coming from Bytes at port)."
Your implementation of a case structure in a while loop works okay as well as long as you put a small wait statement in the false case.
1. Delete the wire that goes from Bytes at Port to VISA Read.
2. Right click on the VISA Read byte count and put in a large number. Such as 1000.
3. Put a wait function of a few thousand milliseconds in your false case as you don't need that loop burning up your CPU checking bytes at port waiting for a byte to arrive.
4. Edit your VI name. "Camera". Not "Cammera". There aren't 2 "m"'s.
04-05-2019 09:11 AM
Thank you i ran the program and it no longer has errors.
It has been done but now I want to optimize the program more than using Byte at port and a case function. I have no other idea, do you have another way.