05-26-2015 09:09 AM
@mori64 wrote:
Could i do st like this :
(baud rate /8)*data length = wait time
?
Not quite. There is typically a start and a stop bit that you have to include. So the time to send a message is: 10/baud rate * # bytes. As Lynn stated, that is assuming no gaps between bytes.
Again, what are you trying to communicate with? Why do you even need to wait?
05-26-2015 09:10 AM
05-26-2015 09:17 AM - edited 05-26-2015 09:17 AM
The device is a loadecell transmitter .
and connection is through RS485 modbus .
i'm trying to read data with polling request .
05-26-2015 09:25 AM
05-26-2015 09:29 AM
As you know in modbus you send read command and then wait for response .
for send command you are using "write serial ".
05-26-2015 09:33 AM
05-26-2015 09:35 AM
I'm with Dennis here. You should know how many bytes are coming back from the instrument (Modbus is a standard after all), so just tell the VISA Read to read that many bytes. Just leave the timeout at the default of 10 seconds.
05-26-2015 09:46 AM
10 sec !!
imagine just once the data is lose .
then we have to wait 10 sec for retry ?
in this device in a boot you have about 1 sec for reading comunication setting by default setting
just in case you forget the comunication setting .
so you need fast polling .
05-26-2015 09:54 AM
@mori64 wrote:
10 sec !!
imagine just once the data is lose .
then we have to wait 10 sec for retry ?
in this device in a boot you have about 1 sec for reading comunication setting by default setting
just in case you forget the comunication setting .
so you need fast polling .
The timeout is just part of the VISA Read. It is not saying it will take 10 seconds to read. It is saying it will wait up to 10 seconds for the data to come in. And if you have a data drop like that, you have more important issues than trying to poll again.
05-26-2015 09:55 AM
you obviously can set the timeout lower,
but try to make sure that you leave enough time in all cases
on a side note:
not everyone is a native-english speaker. please be more grammatically/syntactically correct, to help us understand you better.