02-27-2012 07:25 PM
Hi!
I have a probem with the exporting data from the Simulation loop as graph.
I have created global variable, but in the front panel is not refreshed or exported needed data, but in the file as global variable do ?!
I would like to collect (gather) all data after simulation as Excel data file (export plot data to Excel or save to the speadsheet file) as well as to the terminal image.
Please find attached my files - anyone have an idea or solution ?!
There must be some easy hint
Thanks!
Vasco
Solved! Go to Solution.
02-27-2012 09:00 PM - edited 02-27-2012 09:01 PM
1) Why are you making this problem so much more complex than it needs to be by using a global variable and another loop like that?
2) Why did you wire the VI's path into the image function? You are trying to overwrite the VI on disk with the image?
3) Make sure not to ignore error outputs.
The code shown in the attached screenshot runs fine. I'll take kudos if this helped you.
02-28-2012 04:29 PM
Hi!
Thank You for the hint and advice ... here is also my answer ...
02-28-2012 05:52 PM
OK, I guess you really do want to overwrite the VI with the exported image of the waveform since you did not take my advice there.
02-29-2012 02:29 PM
Hi!
Here is my modification ....
I have another doubt ... why the data from export plot data differs from those saved by the "regular" Excel file ...
Why is the simulation loop finishing faster than the simulation loop is set .... 0 up to 60 seconds with the time step 1 second .... ?!
02-29-2012 03:46 PM
If you are questioning why the two excel spreadsheets have different values, it is because you are getting different data. The collector has data for the entire simulation. For the graph, you can see that the first 55 seconds of the simulation has scrolled off and are gone.
I'm not sure what you mean regarding the speed of the simulation loop. Are you wanting it to run in real-time, as in one second of simulation takes one second to complete? If so, you need to change to hardware timing in the simulation parameters (same place you modified the final time). You'll need to switch to a fixed step-size ODE solver like Euler (RK1) and turn on the "Auto Period" option.
03-03-2012 09:24 AM
Hi !
Thanks for the tip ... it helped me a lot ...
Right now, I would like to make similar (or same) simulation as in the SIMULINK. There is very useful command Generate arbitrarily shaped periodic signal, which makes the easy for engineer to simulate working profile (load).
Among the LV C&S commands, I could not find something similar ... Lookup Table 1D Function .... is very close, but gives very "funny" results .... even for the Interpolate/extrapolate ....
Have any idea how to cope with it ?!
03-03-2012 11:00 AM
I know of no equivalent block. Though not ideal, it shouldn't be too difficult to create your own subVI that takes in the input, simulation time, and period and produces the desired periodic signal.
03-03-2012 01:38 PM
Hi!
Then, I assume has to be done by certain segments/parts and combined together - ramp, square etc. ....
I think the plant model should be done as the subVI and the control VIs (like ramp) are then analysed ...
I will also ask around and give You a feedback ....
Best regards!
03-03-2012 03:41 PM
Hi!
Do You know why my code is not working .... funny answer Error - 20013 ... Anlysis: The width must meet: 0 < width < samples.
Do You know how to make grids on the graph dased and not solid lines ?!
Thanks!