06-28-2015 01:51 PM - edited 06-28-2015 02:53 PM
What is the purpose of the lower two loops? Since they are running in parallel to the rest of the code, all you ever get is the 50ms wait time. Seems rather boring!
06-28-2015 01:56 PM
Let's fix the problems in your code that you haven't fixed yet.
Attached is an updated VI you should work with.
Also, you should try typing your questions in your native language into Google and allow it to translate for you. You seem to be typing things as to how you think English sounds, but not as it actually sounds or is written.
As for your VI, there is nothing in there I can see that would cause delays other than how quickly the instrument will respond to requests for information.
06-28-2015 02:46 PM - edited 06-28-2015 02:51 PM
Here is a slighly more cleaned up version that implements my suggestions. Again, your delays are external.
Modify as needed. You need to be careful when averaging U16 values. The sum might exceed the valid range.
(I left the instrument IO code as is. No guarantees that it is reasonable. I don't do serial)
You need an event for the stop button!
06-28-2015 02:57 PM
RavensFan wrote:As for your VI, there is nothing in there I can see that would cause delays other than how quickly the instrument will respond to requests for information.
Well when the stop button is pressed, there will be an infinite delay (or until one of the other buttons is pressed again, whatever is shorter) until the VI stops. 😄
06-28-2015 03:43 PM
@altenbach wrote:
RavensFan wrote:As for your VI, there is nothing in there I can see that would cause delays other than how quickly the instrument will respond to requests for information.
Well when the stop button is pressed, there will be an infinite delay (or until one of the other buttons is pressed again, whatever is shorter) until the VI stops. 😄
True. But I assumed that the OP had fixed that problem when he changed topics and moved on to the new question about loop delays. Seeing how everything else in the code wasn't fixed, I must have made a very big assumption
06-29-2015 01:30 PM
thanku soo much sir 4 our help... dis is working quite nicely....
07-01-2015 09:17 AM
@altenbach- sir the attachment u modified for me is working well except for the fact that it is showing one error... i.e. actually measure range in the program has no response so when i press range data request button after measure range button den it is taking tym to send data n also it is showing error which i have attached below... i want that measure range n range data request button to work simultaneously..clicking one after another.... sir u have send me the modified solution thats why i am asking this doubt to you....plz sir this one is last error in this program so plz send me the solution for dis.....
07-01-2015 11:18 AM
07-01-2015 12:50 PM
sir i tried doing this but it is working......... sir can u please explain it through a attachment?????
it would be really helpful for me.........thnku..
07-01-2015 01:05 PM
@thakurshubh wrote:
sir i tried doing this but it is working......... sir can u please explain it through a attachment?????
If it is working, why is there still a problem?
As I said, I don't have the documentation for the instrument, so I don't know what the possible reponses, their lenght, and their format is. Do a quick test VI where you simply display the returned binary string for all possible queries. Display them in hex format in a string indicator and tell us what they are.