06-07-2006 03:07 PM
06-07-2006 03:10 PM
06-08-2006 12:24 AM
Hi,
I also forgot to mention that I'm running LabView 7.0 on Windows XP.
Thanks,
Sammy
06-08-2006 01:42 AM
Hi Sammy,
The error number is: 'VISA: (Hex 0xBFFF0015) Timeout expired before operation completed.'
After you send a command you are waiting for the number of bytes from the COM port. The time-out is specified at the start. So if your device need more time then the time-out you will get this error. Also in this way if your device gives a shorter answer then you would expect you will get a time-out.
I think it's better to use the function 'bytes at serial port' in a while-loop. In this loop you wait for a period (few seconds) or the expected number of bytes.
The string you send '0DH' was this ment as three characters ? It looks like a CR
In the third frame the error cluster stops at the second sequence.
Hope this helps.
06-08-2006 02:09 AM
06-08-2006 02:22 AM
Hi Sammy,
I think it is better if you start with a VI that send one command to your device and get this working. If we make this VI useable for all command you can put it every where in your program.
The '0DH' you send are three asci characters. When you want to send a <CR> (carriage return) you must change you string constant (right mouse menu) to '\' or HEX display. In '\' mode you can fill in a '\r' in HEX mode you can fill in '0D'
'bytes at serial port' function is located in the serial pallete.
The answers from your instruments should be in the manual you (should) have.
I will try to send a example VI latter today.
and don't worry about length of your post or the number of questions. There are many LV.... here who are glad to be of help.
06-08-2006 03:51 AM
Hi,
With this VI you can send a command to the COM port. It wait for the numbers of bytes you specify at the input with the maximum time specified in time-out.
Default it adds a <cr> to the command and the time-out value is 1 second.
Place this VI in a VI where you configure the COM port to your settings and add controls to the inputs of my VI.
Let me know if this works and if you can use this in your program
06-08-2006 05:04 PM
Hi KC,
I can't view your vi because I have LabView 7.0, and I don't have LabView 7.1 or a later version. Could you possibly send me the 7.0 version of your vi?
Thanks,
Sammy
P.S. I'll also get cracking on the basic program.
06-09-2006 01:21 AM
Sorry, you mentioned this in your post
Here it is.
06-11-2006 03:59 PM
Hi KC,
Thanks for the VI. I just hooked it up to a basic vi that I wrote. Could you check if I hooked it up correctly? Thanks. I was also wondering what does the do-while loop do if both inputs for the or gate are false. I see that in this case, it continuously loops until the iteration is greater than the # of bytes I specified and then the error that comes out as a time-out, but I was wondering what the function of the do-while loop does along with the shift registers.
I've tested out your program and it works perfectly.
I also tried both cases of adding a terminator and not adding one, and the received string is still the same and no error occurred. Do you think it would be okay to not send a terminator in my query/command string, although the manual states to add a terminator at the end of every string (I know. silly question )
Thanks a lot for the help,
Sammy