From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

serial write finished time

Hello

 

briefly  this is what i need to do .

 

1-Use Serial Write palette

2-Waite until all data are sent

3-Do some thing 

 

 

How can i do number 2 ?

 

Best Regards

 

0 Kudos
Message 1 of 22
(3,154 Views)

You need not worry, once it will write all data then only it will execution will proceed further.

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 2 of 22
(3,137 Views)

just want to add that if you want to read a possible answer from the device after writing to it,

that there might be an inherent waittime until the answer bytes are available in the buffer.

 

:cheers: & good luck


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
0 Kudos
Message 3 of 22
(3,113 Views)
In addition you need to remember that LabVIEW is an inherently parallel language so you need to make sure your dataflow is correct.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 4 of 22
(3,103 Views)

@Ranjeet_Singh wrote:

You need not worry, once it will write all data then only it will execution will proceed further.


That's not really true.  The write function says it is done once the data is sent to the UART buffer.  That does not mean that the data has all been sent, just that is is primed to be sent.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 5 of 22
(3,085 Views)

So how can i be sure .

because of different baud rate i can't add wait time .

and it's not really good way .

 

0 Kudos
Message 6 of 22
(3,076 Views)

@mori64 wrote:

So how can i be sure .

because of different baud rate i can't add wait time .

and it's not really good way .


What are you trying to communicate with?  Can you ask it for a response?  Once you get that response, you know you are ready to move on.

 

If that is not an option, you could use a loop back so that you use another port to read the data.  Once you read it all, you know it has been sent.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 7 of 22
(3,063 Views)

Could i do st like this :

(baud rate /8)*data length = wait time 

 

?

0 Kudos
Message 8 of 22
(3,051 Views)

That will give you the minimum time to write the data.  However, serial (RS-232) communications are asynchronous and there is no guarantee that all bytes are transmitted without delay. Typically no delay occurs but it could happen. If the communications protocol includes any handshaking, delays could be arbitrarily long.

 

What is the reason you need to wait? What is the device at the other end? 

 

I think crossrulz is right. You need a response or some form of monitoring to be sure.

 

Lynn

0 Kudos
Message 9 of 22
(3,034 Views)

there is reponse .

these are all for calculate time out .

0 Kudos
Message 10 of 22
(3,026 Views)