LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Taking data quicker

The Bytes at Port would be taken right after the serial write, since you are waiting for data to be returned from the meter.  You can use this as a trigger to then read the data from the serial port, testing for your termination character in the process.  Broken Arrow suggested this to help with the timing at the serial port and data transfer; otherwise, your port will timeout if it doesn't receive the number of bytes you specified.

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
Message 11 of 14
(184 Views)

@MoReese wrote:

[...], your port will timeout if it doesn't receive the number of bytes you specified.



and you said your loop is taking 20 seconds -- 5 seconds too long. You timeout is wired for 5000mS. There's your extra 5 seconds.

Richard






0 Kudos
Message 12 of 14
(157 Views)

That makes sense if the device is timing out, however I am not timing out.

0 Kudos
Message 13 of 14
(151 Views)

@Dan Stewart wrote:

That makes sense if the device is timing out, however I am not timing out.


Ok, but have you changed your code, following the suggestions, and it still doesn't work? Try sending the command in Hyperterminal and see how long the unit takes to respond. Also try changing your timeout, to say 8 seconds, and see if the loop takes 23 S rather than 20.

 

In LabVIEW, you might use something like this to read the bytes. This is an easy way to get your own timeout. This will allow ~60mS to get the data. Just change the 5 to a higher number if you're not getting all the data.

read ceeal.png

Richard






0 Kudos
Message 14 of 14
(144 Views)