LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

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

Hi Kok,

 

do you read what I write?

 In message #5 I wrote:

"Your error description seems to come from a ScanFromString function. Are you sure it's generated in this very subVI? Are you really sure about this?"

 

Have you double cross-checked that?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 11 of 34
(1,464 Views)

Hi,

 

Actually the indicated problem is the SCANFROMSTRING function, but i dont know what is wrong with my input string that causes it to say it does not contain data in expected format.

 

Regards,

Kok Wan

0 Kudos
Message 12 of 34
(1,460 Views)

Hi kok,

 

then please show us

- the input string

- the used format string for ScanFromString

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 13 of 34
(1,458 Views)

Hi,

 

I did upload my program in the message. My input string is in (display mas and ana data with auto starting time on the interface.vi).

0 Kudos
Message 14 of 34
(1,456 Views)

Hi kok,

 

the format string is "%d:%d:%d". What is the input string when the SFS fails? You didn't save any inputs with your VI...

 

I suspect you want to scan timestamps like HH:MM:SS. When the scan fails you provide something different from that format...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 15 of 34
(1,454 Views)

Hi,

 

What does "%d:%d:%d" stands for? How i go about inputting HH:MM:SS?

 

Regards,

Kok Wan

0 Kudos
Message 16 of 34
(1,462 Views)

Hi kok,

 

"What does "%d:%d:%d" stands for?"

RTFM!

Again I have to suggest to read the context help... (Please follow the link that explains the format codes!)

 

"How i go about inputting HH:MM:SS?"

This subVI is expecting timestamp data formatted as HH:MM:SS. You have to load the correctly formatted data files...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 17 of 34
(1,460 Views)

Hi,

 

Sorry about that! The input string that causes the error is in between 18:30:00-18:45:00. Maybe i can attach one of my data files for you to try computing to see if you encounter the same problem as me?!

 

Regards, Kok Wan

Download All
0 Kudos
Message 18 of 34
(1,458 Views)

Kok Wan,

You have to find the input that causes the error. Knowing that it is between two values doesn't do much good. There's obviously an input that's causing it to error. You just need to find which one that is. It's hard to tell how often the loop that contains all that code is in is running. There also seem to be some unecessary sequence structures in there, but that's another topic I suppose.

 

If you have to run your program a long time to find the error and you can't watch every iteration of the code, try logging the input data to a file then go back and look at the file with all the data in it. Or you could use the error output from the Scan From String file to trigger the true case of a case structure so it writes the value that is causing the error to an indicator or to a text file.

 

These are just some ideas to help debug. Others might have some suggestions that are even easier to implement.

 

Eric

Message 19 of 34
(1,442 Views)

You can also put a probe on an error wire, and set it to pause on error under the conditional tab.

Message 20 of 34
(1,437 Views)