I am writing a program, which in it's final state, will display battery voltages, in bar graph form, of 13 batteries. I am running a simulation to show voltages stored in an array. The attached picture is a screen shot of simulation. In the box "Specify the index of the array" I am not sure what to key in, as the prompt is partially obscured.
Thanks in advance.
Simulation variable display question
Moderator: Benj
-
- Posts: 162
- Joined: Thu Jul 01, 2010 1:57 am
- Has thanked: 23 times
- Been thanked: 16 times
- Contact:
Simulation variable display question
- Attachments
-
- Voltage Bar Graph.fcf_avr
- Program.
- (11.5 KiB) Downloaded 228 times
-
- Adding Variable to Simulation.png
- Screen Shot
- (106.91 KiB) Downloaded 505 times
-
- Matrix Staff
- Posts: 9521
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
Re: Simulation variable display question
Hi billduck
Normally you can just press ok then all the arrays will be shown.
However it looks like there is a bug with adding local variable arrays to variable window (unless its deliberate with locals, i'm not sure).
What it should show is:
What you will need to add at the end of the variable is square brackets and array number inside.
So in your case with array of 10 you will need to add[0]......[9] on the end.
e.g
ReadVoltages.Vsub_i[0]
ReadVoltages.Vsub_i[1]
ReadVoltages.Vsub_i[2]
...
...
ReadVoltages.Vsub_i[9]
Martin
Normally you can just press ok then all the arrays will be shown.
However it looks like there is a bug with adding local variable arrays to variable window (unless its deliberate with locals, i'm not sure).
What it should show is:
Code: Select all
Enter variable between ReadVoltages.Vsub_i[0] and ReadVoltages.Vsub_i[9]
So in your case with array of 10 you will need to add[0]......[9] on the end.
e.g
ReadVoltages.Vsub_i[0]
ReadVoltages.Vsub_i[1]
ReadVoltages.Vsub_i[2]
...
...
ReadVoltages.Vsub_i[9]
Martin
Martin