02-27-2014 01:26 PM
02-27-2014 01:54 PM
Heres the software.
02-28-2014 05:12 AM
Anybody got any ideas?
02-28-2014 11:39 AM
Hi there,
I've had a bit of a look into your code, and have modified it a bit to try better understand it. I'm not quite sure what's happening to give you negative results out of your strain analysis, but I think I may have picked up on some other issues.
I've commented the changes I've made, but in summary:
1) Removed sequence structure and enforced dataflow with error line
2) Modified the DAQ section to just a random number generator for the sake of testing.
3) Set data feed into excel section to indexing output rather than last value
4) set iteration count of the for loop to address 10 strain measurements out of the array
5) Changed text file logging to "open or create" to avoid errors which might occur if the file already exists during multiple runs - but this would depend on you wanting to write to the same file each time
Note: In your for loop, if your attempting to relate the loads in the first column to your last 10 strain measurements, then this would be an incorrect way to go about interacting with the listbox. Please see this example which demonstrates how to address items in a listbox: https://decibel.ni.com/content/docs/DOC-5808
Attached is the edited/commented vi - I hope this helps in some way and I haven't misunderstood! I'll have another think about the negative values issue..
02-28-2014 12:05 PM
That has been a great help, thanks!
One thing though the ms toolkit is causing an error-- "The subVI is not executable. You must fix all errors in the subVI before this VI can run." Will this be because I don't have the template for it on my computer?
Cheers,
Mike.
02-28-2014 12:09 PM
Apologies I'm tripping over my own feet here. The error with the toolkit will be because it is not available on the trial software that I am using at home.
Many Thanks.
02-28-2014 12:52 PM
Another question after having placed the correct listbox vi into my program how do I then go about relating it to the strain values so that the ms toolkit gathers the correct data?
03-04-2014 10:23 AM
Tested the improved version of the program, gathers data fine using the random number generator as a simulator to check everythings working. Stores data in a single text file and saves first 10 values to excel spreadsheet.
However, still getting negative values and cant think why this would be.
Other thing trying to connect the listbox up is causing me some problems.
03-05-2014 04:22 AM
The example link demonstrates how you can use property nodes to access your listbox items, and then use array functions to write new values to your listbox - you can't just copy and paste the sample code section to get the functionality you need.
You'll want to create new property nodes for the listbox on your Front Panel (copying and pasting property nodes won't reference the correct object on your front panel, notice the name is "..Listbox 3"), edit the array aspects of this code to read values from the array rather than write values to the array, and remove the while loops and event structures as your just using this to access 10 items in the list.
Unfortunately I'm not sure what the issue is regarding negative values from your strain analysis - is this a case of the value being negative/positve depending on it being a tensile/compressive stress?
03-05-2014 05:35 AM