Hi CC,
The last problems...
The vis runs ok, right now i use this vis in other main vi, which use differents vi, so i execute the the main vi (serial), open one window in my main program, the main vi serial, wait to me, since i have a bottom in the pic, when i push start, the pic send values and when i push stop the pic stop to send readings....
The normal thing, is the vi STOP when the timeout is passed, but this vis, have the for loop 120 values (i modified the pic to send the sync bytes each 120), then the vi continue other cycle of for loop very slow if it get to 120 then the vi say " time out error"...
Then when i execute my acquis. window, i can to have the bottom stop to send readings, and the program continue running, when i push start get values... this could be valid, althoght if it goes well, i only must to adjust the timeout... But the big problem is when i finish the acquisition. If i stop the data recieved with the bottom of vi, i push and maintain pushed until arrive to 120 the for loop, then stop to acquire data and close the window,later draw the data in my main program, it is not real time but is valid.
The problem is, when i am acquire the data, normally i stop the data with the bottom of pic,if i do that, the data stop to recieve but the vi continue running, since the serial vi, increase the counter of for loop very slow... until 120, when it arrives to 120 will stop the vi with error, when i stop to send data, the serial vi work, and when pass the timeout show M1=0 , M2=0, M3=0, but the counter of for loop goes incresing. its very bad!.
I tried, when i push close, in the main vi, the for loop would be = 0 , then the serial vi will be stoped , but is not run. I dont know why.
I need any structure, when i push stop in the mainvi, the serialvi change the constant value of cycle for loop to 0. Then will close in this instant!. Normally when i push the stop bottom in the pic, the serial vi, is lossed inside of for loop and its the problem.
Any advise in the vi?.
Charly thanks for your patiente with me! We are near to finish!.
The program is a lot of bigger, it is only the acquire data, the other part is all ok!. Before i used read from file, i saved the data with c++ program, and now i want real time acquire...
Regards, Fonsi.