187063 Posted June 24, 2004 Report Share Posted June 24, 2004 { Error -1073807339 occurred at VISA Read in Serial Read((Write Commands From File)7.vi Possible reason(s): VISA: (Hex 0xBFFF0015) Timeout expired before operation completed. } i have been getting this error pretty often i only managed to get a portion of the data that i would like to obtain from the device hope you all could help me explain this problem, thanks you thanks a lot for helping me out previously Quote Link to comment
aledain Posted June 24, 2004 Report Share Posted June 24, 2004 The timeout means that you are reading the VISA buffer and there is no data present. If the message is CRLF terminated, then you might be missing packets because your program loop time does not service the VISA buffer at fast enough intervals. Although VISA does tend to store multiple messages for you. Alternately you are seeing a timeout because you are looping too fast; but as you believe you're missing data I would guess too slow or that the serial device is a different type (see below). You neeed to determine which type of device you have. Serial devices fall into three broad categories (or modes): sender only, sender receiver, and lossless. 1. Sender Only. This is where the device spits data down the serial line at you. You need to know how often this happens (interval) and if it is relatively infrequent, ignore the timeout because it only means that you have not received a packet for a "while". If the packet fails to arrive in 2-3 x interval it can safely be assumed that your device is not communicating with you any more. 2. Sender Receiver. This is where the controller (usually the PC) has to send a command to the device and then wait for the data to be returned. For example GETDATA is sent and -76.34 is received. In this case, make sure your VISA timeout has been set > 2 times the expected response time. The response time will include the instrument response time plus the time it takes for the data to be physically sent across the serial cable. This is an issues if the baud rate is low < 9600 and/or the amount of data sent back is large (in bytes). 3. Lossless. This is where ACK commands are sent between devices. When a message is sent between a controller and slave device (which might be the PC), an ACK needs to be sent to tell the controller that the packet was received and decoded correctly. If the ACK is not sent then the controller usually resends the packet and waits for the ACK; usually three times before the controller reports an error. More robust industrial serial protocols (eg MODBUS) can use this communication mode, but some other instruments use complicated protocols like this, eg Mettler Titrators. Note: Some devices can switch between these modes by sending a command to the device or in certain phases of their normal action. Quote Link to comment
187063 Posted June 28, 2004 Report Share Posted June 28, 2004 thanks a lot mine is a sender receiver so all i have to do is to increase the timeout limit at tthe beginning of the program ? i have attached my file for better understanding i have an additional question, may i know how could i print out the C: prompt in MS-DOS on the screen ?? i could send commands and look at the results, but i would love to see the prompt printing to my files too, may i know how to go about doing it ? thanks Download File:post-19-1088384949.vi Quote Link to comment
187063 Posted June 28, 2004 Report Share Posted June 28, 2004 when i change the timeout operation, am i supposed to change the timeout operation at the VISA Configure ? if i'm suppoosed to change that, i have already done it, but is still giving me the same error, i hope someone could shed some light on this thanks Quote Link to comment
187063 Posted June 28, 2004 Report Share Posted June 28, 2004 this is the updated file that i have done, i have made minor changes to the timeout , i hope you guys could check it for me and inform me about the necessary changes thanks Download File:post-19-1088410698.vi Quote Link to comment
regisphilbin Posted June 28, 2004 Author Report Share Posted June 28, 2004 can you give a little more information on what device you're reading from and what you're planning on receiving from the serial port? Also, NI has quite a few Serial Read/Write Examples you can go through if you're having Serial problems.... Quote Link to comment
187063 Posted June 29, 2004 Report Share Posted June 29, 2004 i'm planning to read from a netoworking switch, i'm planning to get the counters information from the switch and write it to a file. i have already seen the examples from the file\ hope someone could shed some light on this Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.