LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error messages


@johntrich1971 wrote:

@labview99 wrote:

Thank you.

Sorry, what do you mean when you say to try to clean that to fit on one screen? I don´t understand what do you mean..


Your block diagram is extraordinarily large. It can actually be made better with Clean up diagram from the Edit menu (if you write good code this actually makes it worse, but it might be a good starting point for you). You've got lots of white space. Put things closer together and make the wires neat. Making the block diagram so large means that many have to scroll to see the whole program, making it extremely difficult to follow the flow. Read up on LabVIEW style for more information.


^^

 

A useful thing you might not have known.

Holding Ctrl and dragging the mouse adds whitespace between things.

Holding Ctrl + Alt and dragging the mouse removes whitespace.

Works on the front panel and block diagram.

Can do strange things when removing space in Case Structures (or things with hidden code) but generally still useful if used with a bit of care (or in small chunks at a time).

 

That's basically the main tool I used to produce this edited version.

 


GCentral
0 Kudos
Message 131 of 143
(1,564 Views)

Thank you very much for all your advice and for your help!!

Do you think that now is it doing ok what I want it to do?

I attach the program

0 Kudos
Message 132 of 143
(1,549 Views)

Sorry, I have a question regarding my program.

To pass from one state to another the array that comes out of the VI that I am using in the first case called "meter posicion", to be able to pass this array to other states and to be able to modify that array, I have to do it with the shift register as I have it set ?

 

0 Kudos
Message 133 of 143
(1,529 Views)

If you need to pass data from one state to another then yes you do that with a shift register. Don't forget to wire the value across for those state where the value does not change. If you start getting too many shift registers one common method is to make a bundle that contains all of the data that needs to be passed and then use bundle by name and unbundle by name to update the values.

0 Kudos
Message 134 of 143
(1,527 Views)

@labview99 wrote:

Thank you very much for all your advice and for your help!!

Do you think that now is it doing ok what I want it to do?

I attach the program


That looks a lot better. There's still some room for improvement. Try to make your wires straight when possible. Also, when possible try not to have wires which go from right to left. Finally, I saw at least one hidden wire. 

 

You still have a lot of controls/indicators that I don't think that you need. Replace those with the values that you would have sent to the subvi.

0 Kudos
Message 135 of 143
(1,526 Views)

The coherence dot on the enum is a bit concerning

Frozen_1-1585259642709.png

 

You should consider changing the enum into a type-def

---------------------------------------------
Former Certified LabVIEW Developer (CLD)
0 Kudos
Message 136 of 143
(1,513 Views)

@Frozen wrote:

The coherence dot on the enum is a bit concerning

Frozen_1-1585259642709.png

 

You should consider changing the enum into a type-def


Good catch Frozen. Yes, enums should be a type def.

0 Kudos
Message 137 of 143
(1,476 Views)

@Frozen wrote:

The coherence dot on the enum is a bit concerning

Frozen_1-1585259642709.png

 

You should consider changing the enum into a type-def


To expand on this thought a bit:

 

The reason why you want to do this is because changing the items in the typdef'd control will flow its changes to all instances of that typedef.  The change will flow to your state case structure and it will break your code because there won't be a match in the case statement for the new item.  This makes it very easy to figure out where you need to add the additional code for your state machine.

 

Another advantage is that if you change the name of an item, any case structures depending on that enum get updated so the code WON'T break unnecessarily.

 

Deleting an item will also cause broken code.  You can then easily find the case structures that are broken and delete the orphaned case.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 138 of 143
(1,447 Views)

Ok, I have changed!! Thank you for your explanations

 

Do you think that since I have made now the state machine and since I have all the cables connected, will my program do the following?
When I rearm the machine in the "rearmar" state and the condition I have set is met, it will change the number of position 4 in the array to 0 and then send it to the "start flag" state to put number 1 in the position 4 of the array?

 

Best regards

0 Kudos
Message 139 of 143
(1,442 Views)

I should probably not jump into this....

There are still too many coding issues for you program to work.

Most notably, you are not using the shift register correctly.

 

Frozen_0-1585343037735.png

You need to maintain the information between cases by wiring every case all the way across, like this for *every* case of your state machine.

 

Frozen_1-1585343248175.png

 

 

---------------------------------------------
Former Certified LabVIEW Developer (CLD)
0 Kudos
Message 140 of 143
(1,418 Views)