Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

VBAI - Data logging

Hi guys

I am experiencing an incovenience when using the Data Logging step in VBAI. I'm logging to local files and using multiple data log files, starting a new log entry each 1 day. I see the problem in the way how the log filenames are automatically generated. For example, for today, I'm getting a filename Log07-10-25 00.00.00.627.txt. The problem is in the fractional number of seconds, which IMHO should not be there, or be always zero. As it is now, the fractional number changes each time my inspection script is closed and reopened. Thus, I am getting many different log files for the same day, while I need all the logs within one day to stay in just one logfile. Is there a way how to solve this, besides writing my own custom step for data logging?

Vladimir

View my profile on LinkedIn
0 Kudos
Message 1 of 7
(4,480 Views)
...this applies to VBAI 3.0.1

View my profile on LinkedIn
0 Kudos
Message 2 of 7
(4,468 Views)
Hi vdrzik,
 
Yes, there doesn't seem to be any option that will let you check if a file exists for that day. The easiest way to get around this is to create your own VI. I will make sure that this feedback is recorded.
 
Jaidev Amrite
National Instruments
0 Kudos
Message 3 of 7
(4,449 Views)
Vladimir,
 
In the Vision Builder AI 3.5, coming up very soon, you'll be able to set the file name of the datalogging step and image logging step to the value of a previous measurements. For example, you can use the calculator step to compute the name of the file name based on the day for example and use this output of the calculator as the name of the file to log.
I hope this will solve this usability issue.
 
-Christophe
0 Kudos
Message 4 of 7
(4,428 Views)


Vladimir Drzik a écrit:
Is there a way how to solve this, besides writing my own custom step for data logging?

Vladimir


Hello,

No. To my knowledge the only way to do that in VBAI 2.6 and 3.0 is a custom step. I made a custom step to match my needs a couple of months ago (it's in VB AI 2.6 if I remember well). If you're not planning to move to VB AI 3.5 when NI starts shipping it I can dig in my old project to post it here ; you might have to modify it a bit to match YOUR needs...



We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 5 of 7
(4,414 Views)
TiTou: Thanks. I'd appreciate if you put your custom step here.
Christophe: Yes, programmatic generation of the filename can definitely solve that issue. Nevertheless, I think even the default automatically generated filename could do if there just wasn't the (nonzero) fractional part of seconds.

Vladimir

View my profile on LinkedIn
0 Kudos
Message 6 of 7
(4,396 Views)
Here it is.
Let me stress that I didn't have time to finalize it (the debug tab is still visible) as far as I can remember it works well, in fact I used it only for testing my inspections overnight and never used it in a customer application.

It's in LV 8.0.1 for VBAI 3.0.1

Hope this helps


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 7 of 7
(4,382 Views)