LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I get this text indicator?

Hi, I am new to Labview and I am going through Labview Tutorials and this one has me stumped. I am using Labview 12 and the tutorial is in the White Papers, Module  7, State Machines, step 10. (Coke Dispensing Machine).

 

In the last 3 states in the block diagram they show a purple or pink text indicator named "Money Deposited" with a constant wired to it. I placed this indicator earlier on but only one, can have a different constant for each state? If so how do you do that? The tutorial doesn't explain.

 

When I wire the right hand tunnel to the right shift register, all the states in the case structure change back to numbers, delete the wire and they return to named states. Am I doing something wrong, the wiring looks identical to the tutorial.

 

I really want to get my coke dispensed, any help is much appreciated!

 

0 Kudos
Message 1 of 7
(3,790 Views)

Can you post the diagram?

0 Kudos
Message 2 of 7
(3,782 Views)

Hi Doug_M,

 

Let me start with the "Purple or Pink text indicator" you saw on the image. Its actually not an indicator but a "Local variable" of the text indicator. You can create a local variable by right clicking an indicator or control and selecting create, Local variable. You can create multiple local varibales and add it in different states with different contant values wired to it. Hope I addressed your first query. (for more info refere to this link)

 

Regarding your second question regarding shift registers. make sure that you are doing the steps 6, 7, 8 and 9 properly. After this when you connect the right tunnel to the right shift register, it should not turn the cases to numbers. One thing which you can check is that in all the states of the case structure, the values wired to the right terminal of the case structure is getting the value of the enum. If there is a non enum value passed at any part of the comparison logic, it may eventually cause the change in cases to numeric.

 

It would help us to give you better support if you attach the vi which you are working on from next time onwards when ever you post a question. 

 

regards,
NitzZ

(Give Kudos To Good Answers, Mark it as a Solution If your Problem was Solved :smileywink:)

 

Message 3 of 7
(3,741 Views)

Thanks for your reply, I actually figured the local variable part out last night, I'll try your sugestions tonight (This is a homework project for now) and I will log in to this from the labview laptop so I can attach diagrams!

0 Kudos
Message 4 of 7
(3,708 Views)

Thanks, I will do that!

0 Kudos
Message 5 of 7
(3,702 Views)

Ok it works now, the Enums in the different cases were not created properly, I didn't right click, then create constant, I think I made a new enum each time and that messed it up. The coke is now dispensing, onward to the next Tutorial! Learned a lot from this one , thanks!

0 Kudos
Message 6 of 7
(3,645 Views)

@Doug_M. wrote:

Ok it works now, the Enums in the different cases were not created properly, I didn't right click, then create constant, I think I made a new enum each time and that messed it up. 


Sounds like your Enums are not type defs.  I can't think of a good reason why all Enums aren't type defs to begin with.  That way when you update the control Enum to have new items or rearrange them, all other other constants, and controls get updated automatically.

 

If you started from the State Machine template I think the enum is a type def from the start.

0 Kudos
Message 7 of 7
(3,626 Views)