04-17-2014 12:02 AM
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.
04-17-2014 03:56 AM - edited 04-17-2014 03:56 AM
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…
04-17-2014 05:23 AM
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 .
04-17-2014 06:07 AM
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.
04-17-2014 06:42 AM
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
04-17-2014 12:12 PM
04-18-2014 01:49 AM
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 .
04-18-2014 01:54 AM
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 .......