LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

increment the number with date/time string. when ever the next date come's it should reset again with initial number

 i want to store the number of records in a file. Every time when ever i run the program the record will be incremented well i using forloop with count value 1 as a constant .in the for loop i am using autoincrement with the  feedback node . to view the number i have attached the indicatator .the number will be increment every time . i am using number to time time stamp  that is connected to get date/time string. from that we can view the date string and time string . so , my issue is when ever i close the code again it is coming with intial value . i should get from that number only where ever i close the code . after the date completed again it should come from intial value . i am attaching the code so that u guys can solve my problem.

 

0 Kudos
Message 1 of 8
(2,912 Views)

Hi dow,

 

next time when you attach "code" you should attach a VI or a snippet or a real picture (PNG preferred). Using a DOC file is considered "bad behaviour"!

 

- You don't need a FOR loop in your code.

- You should not use STOP in your code.

- You should THINK DATAFLOW: Setting the "record" indicator to it's default value is nonsense when it is displaying data coming from feedback node!

- You have to change your FBN initialization to fit your needs: it's nonsense to init it once the VI is started the first time…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 8
(2,890 Views)

our requirement is daily we have to run 200 to 300 electrical boards in ni-zigs ...... we want to see how many boards we are doing  per day. for that purpose

->i am using the string indicatator in fornt panel to see my electrical board record.

->i am using feedback node from my indicator so that next time the value will increase from the previous value.

->well, other thing i should not use  for loop, but, i want every time  constant value as 1 when ever i want to open my code default it should come from 1.  thats why i have used for loop.does it make sense or not you should suggest me.

..........by the way i am begginer in ni . 

0 Kudos
Message 3 of 8
(2,878 Views)

Are you storing your test results anywhere?  I'd be using a database, so an SQL query would easily get me the number of units I've tested in a day.

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 4 of 8
(2,865 Views)

hi jim,

 

the total test results will be storing in files..........well i have created one file.............by  concatenating all indiviual strings like one for total result,one string for storing records , one string number of records that i am storing.........i think there is no need of sql query here...........

if u have idea of storing results using sql query .........can u show me the sample 

0 Kudos
Message 5 of 8
(2,859 Views)

I'm not clear on how you're storing your data.  Could you post an example?

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 6 of 8
(2,845 Views)

here you can see.......the file path in case structure in that i have included my requirement of increment the number 

 

 

-> if the case is true then it goes in ok file path and the no of records string will pass in the file by seeing these code u will get clarity

 

my requirement is the number of records should increase ........ whnever the program runs...that i made it. by the next day again it should begain with the intial value.........that is my requirement. i hope u understand . 

0 Kudos
Message 7 of 8
(2,832 Views)

here you can see.......the file path in case structure in that i have included my requirement of increment the number 

 

 

-> if the case is true then it goes in ok file path and the no of records string will pass in the file by seeing these code u will get the clarity

 

my requirement is the number of records should increase ........ whnever the program runs...that i made it. by the next day again it should begain with the intial value.........that is my requirement. i hope u understand .

 

suggest me how can i use the  intial  value .......

0 Kudos
Message 8 of 8
(2,825 Views)