LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can someone help me with my subvi (auto searching two end time.vi)

Of course that would be the easiest way. Do what Ravens Fan suggests. Probe the error out of the Scan From String and your input to that function.

0 Kudos
Message 21 of 34
(670 Views)

Hi,

 

How do i probe the error out of the Scan From String and my input to that function. I am pretty sure that the input value that causes the error is 18:30:00.

0 Kudos
Message 22 of 34
(664 Views)

Draw an error out wire on your Scan From String function. Place two probes as shown. On your error out probe select the error pause condition. This should stop it on the input string that causes the error so you can be sure what that string is.

 

pause-on-error.png

0 Kudos
Message 23 of 34
(652 Views)

If you aren't familiar with probes, then you need to take some LabVIEW tutorials.

 

I would recommend :

 

LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours

 

Also, if you stop your VI once the VI pauses on the error probe due to the conditional break.  You should be able to right click on the input string wire going into it and pick Create Constant.  Now that constant will contain the actual data so that when you attach your simplified VI, we can have something to work with.  (In case the problem is some non-printing character that is corrupting your conversion.)

0 Kudos
Message 24 of 34
(647 Views)

Hi,

 

I had tried the probe to source for the error. When the program is paused, showing that error had been found, I tried to stop the program and create constant fromt he input string, unfortunately it shows blank. So what should I do?

 

Regarding the code capture tool, is it applicable for LabVIEW 9.0? Somehow, after installing the code capture tool, I am unable to find it under tools menu. Pardon me for uploading .JPG files again as I really have no other ways to upload my pictures to show you guys the process.

 

Regards,

Kok Wan

0 Kudos
Message 25 of 34
(636 Views)

Was probe 8 blank too? It sounds like it might be an empty string that is causing the error.

 

OK, so this is just a bandaid to keep you running while you work on the rest of your program. If it's a blank string that is causing your problems, add a shift register on your For loop and some logic so that if you get an empty string it will use a valid input that was previously stored on the shift regsiter. Keep in mind that unless you initialize that shift register with something, it will error if the first value in is not compatible with your format string.

 

If this fixes your problem, put a big comment on this part of your code to remind you to come back and investigate why you sometimes have inputs to this function that are not valid.

 

Eric

 

 

bandaid.png

0 Kudos
Message 26 of 34
(627 Views)

Somehow, the problem is solved but it does not continue getting new string input after 18:15:00. It just stopped getting new input string value.

0 Kudos
Message 27 of 34
(623 Views)

Well then it doesn't really sound like the problem is solved. If no new strings are being input to your function beyond 18:15:00 then you need to go back and find out where the strings are coming from. It looks like they are coming from an "ana file"? My suggestion is to explore the data path of that string from its source all the way up to the point that it's causing problems.

 

It will take some troubleshooting, wire probing, setting breakpoints, etc. I don't have the files your program is reading from. This is one that can't be solved just by looking at your code. It has to be troubleshoot while it's running.

0 Kudos
Message 28 of 34
(612 Views)

Are you sure the problem isn't caused by your "auto searching two end time.vi"?

 

It is doing something (don't know what since the VI is not attached) to come up with some index values that are used to pick out an array subset.  If the indices don't exist in that array, you are going to wind up with the default value for the array which would be an empty string.

 

I suspect your subVI isn't doing what it is supposed to and giving you indices out of range.  Put probes upstream of the functions that are giving you the problem.  Compare the indices coming out of that function with the size of the array.

0 Kudos
Message 29 of 34
(609 Views)

Maybe I can send some of my files to you so that you have a rough idea of what am I trying to do with the program. In a way, I think that it will be easier for you to help me. There are 2 .zip files tryout.zip is that program and 110308.zip is the data that i use for my program for the calculation and graph plotting.

Download All
0 Kudos
Message 30 of 34
(598 Views)