structure of the case runs bad deal

I have a Subvi, which has two structures matter.  The internal structure of the case seems to be running the wrong case.  I joined highlight the Subvi execution.  You can see that the terminal selector TRUE being feed into it, but the case that is running is FALSE.  Does anyone know what the problem with the code?

Appreciate your help

Sarah

Also, your whole VI seems to be based on constants of diagram (I see no control!). There could be a lot of current folding . You can turn your input string into a control for a more realistic experience.

Tags: NI Software

Similar Questions

  • Structure of the event within the structure of the case run once

    Hi all

    I am a controller using myRIO and labview where the program compares a value of the probe in a "Preset" and then choose a structure case depending on what type of air supply is required. What can be seen on the picture, for example, is 0 if saturated air supply is necessary.

    The structure of the event is used to send a signal to step to the stepper motors to open the valves (closing is still pretty much in the same way). In any case, the event turns my valves 90 degrees. I read the sensor all a second, however, when the case remains unchanged, the case runs the event again causing my engines running at 90 degrees per second (essentially continuously). What I'm looking for is a way to send the signal to step only once until a new case is selected.

    He is not on the photo, but this is all within the large loop.

    Apologies for any bad/cringeworthy coding, it is literally my first program always using labview. I can post the full VI if you need.

    Any ideas would be very appreciated! Thank you

    Simos wrote:

    crossrulz you have a simple example by chance that uses the feedback node?

    See if that helps

  • Not not not in the Structure of the case

    You want to get suggestions on the best way to do it.  In theory, it will be the best if I can create a structure to deal with condition 'no '.  What I mean, it's the entrance to the structure of matter is 3, and I have a case which, with such condition does not (1, 2, 4, 5), the case would run.

    Another example

    If different x of 1, 2, 4, 5, then

    to do this

    Else If x is not equal to 6, 7, 8, 9, and then

    do this

    End

    Yik

    ^ You can also simply make a table with your constant inside and feed to the comparison table, and who publishes an array of bool.

    Another approach would be to wire the digital directly to the structure of the case and type the desired number of a case to represent.  Several case numbers are separated by commas.  A range of numbers can be represented by "..".  for example 6,7,8,9 = 6.9 in the same way... 0 is the range - inf by 0 and 5... is all values greater than or equal to 5.

  • Store/communicate IMAQ image (binary) between the structures of the case

    Hi all

    I am trying to build a VI for a controlled industrial vision system and it has 2 process: first an image of calibration comes a sequence of discrete of images. After that, the user can start and stop the continuous controlled process of machine vision. This process then uses the calibration image to remove some background objects etc..

    As the two processes cannot run at the same time, I programmed it as an event-driven state machine (following this tutorial: https://www.youtube.com/watch?v=RuIN31rSO2k) combined with continuous acquisition.

    My question is how to store and communicate the image of calibration between the structures of the case. It is basically a static image that is generated at the start of a race and then used once during the continuous control loop.

    Now, I tried storing in an IMAQ control with a local variable, but it does not work when I try to read the image. Preference image must be passed the bottom without any interference of the façade. I could probably make it work if I pass on the image in a table and then convert it back, but I want to avoid unnecessary conversions and understand how to manage the images correctly.

    Joined codeblock showing the part where I (attempt to) store the image and how the process of continuous measurement is connected (Yes, I know the live view is wired incorrectly in the scheme of the latter, it was a test to show a colleague).

    Thanks in advance for any help!

    Consider placing the image, the data record in a turn on your main WHILE loop.

  • I want to display strings that are in the structure of the case, in a text area

    Hello

    I write a vi, which has the structure of the event inside that one

    structure of the case.

    I have a problem, I have two cases.

    (1) when the value is true it executes the real deal, first it reads the string constant and second string indicator which is my out is put.

    (2) in the case of false it is pritty much even.

    I want to display the entries and exit puts different situations in the same text box is one for input and one for output.

    Someone can help me.


  • Value of cluster lost when you leave the structure of the case

    Hi all

    I'm having a problem with a particular VI I'm working. (FYI it's in Labview 8.0)

    The VI is set to run a current source, voltmeter and thermometer, then recording and graph the data in various ways that can be selected by the user.

    Everything seems to work fine except a particular graphic method. When I try to graph current compared to the tension, the current value is lost estates. In a case the current and voltage are combined to form a cluster, and then leave the case structure to be later appended to a table of cluster.

    However, the value of the cluster is lost when the chart is set for the voltage vs. Any other method and it works correctly.

    I can't understand why this is happening as it does not make much sense than other methods of work charts, but this one isn't when it is coded the same exact other than having the different variables.

    I have attached the VI with added indicators showing that the value of cluster is lost once he leaves the box structure. Any help would be appreciated.

    Thank you very much and I apologize for my extremely messy VI.

    -Nathan Cernetic

    You really need to boil this down to something we can run and reproduce the problem.

    Have you tried to break a few relevant connections and rewire? Something is possibly corrupt.

    Besides being a mess, your VI has quite a few glaring errors.

    Let's take a look at the structures at the top right:

    • 90% of the code is the same in all the structures of three cases, so all that needs to be inside the structure is the small part where you built the table 2D. All the rest is outside of the case.
    • The structure of the sequence has no useful function.
    • Why do you need to reverse the table with each iteration of the small loop FOR? Once before the loop would be sufficient. Right?
    • Why you use table built inside the small loop FOR, but no autoindex on the edge of the loop? All you ever get is an array containing exactly one element, no matter how the loop runs. Seems unnecessary! (see below for an alternative image).
    • You wouldn't even need to reverse if you want to use "built the table" instead of "insert into the table at position 0" in the central part.

    Other: You constantly hammer all nodes of your property. The only need that will be called when things change. Again, you have far too many cases. For example, in the structure of the case where you are having problems, the same nodes of property exist in all cases. A single instance of the property node belong outside the case and only the string inside each case constants. Whenever the code is the same in all cases a case structure, which code belongs to the outside!

  • Get the button to change automatically after the structure of the case is completed once.

    Hi all

    The purpose of this VI (which I lightened it for the purpose of the present) is to do nothing until the START button is true. Then the structure of the case, and the string will be sent to the MSH. I need this too such that the stop command can be sent at any time and will be sent when the STOP button is true.

    At the present time, nothing happens until the BEGINNING is true, then the case structure begins and ends inside while loop. BUT then the outer while loop restarts again and the inside of a cheek through which returns once again the order of the string to the MSH (an unwanted process) because the START button is always true.

    Is there a way to get the start button to return to a State of false once inside while the loop is over?

    (Other solutions giving the same result would be very appreciated also!)

    BBRO says:

    The purpose of this VI (which I lightened it for the purpose of the present) is to do nothing until the START button is true.

    Well, your code sends a command to stop immediately after starting the program while consuming all CPU running the inner loop in parallel as fast as the computer allows. (Since there is no dependence on the data, the inner loop and the stop code both run at the same time. LabVIEW does NOT run left to right!).

    All you probably need is a simple while loop, a structure of the event with three cases and all the buttons in the action of locking.

    See attached a simple change, LabVIEW 9.0.

    (And please don't maximise front panel and diagram for full screen, especially if there isn't much here.) Sometimes we want to work on other things at the same time, for example to write this response!)

  • RandomGen elements, case structure nothing if it's false, while the loop passes iterations, can not get the values in table outside the structure of the case

    Hello!

    I tried to build a trigger that triggers a true value each 1000 milliseconds (from the first real);

    which real command structure box to a value of the randomNrGen of the sample and place it in a table.

    but I would like to USE this table and I can't do this beacause I can not get out of the structure of the case.

    AND:

    the while loop ignores samples; If you run the vi and look at the speed at which the table fills, ypu notice it is not periodic: the first few items are inserted at 1 second interval, but then it jumps one;

    would it be because of the wait time 1ms?

    1. How can I create a structure that does this:

    If set to True, it samples a value from Genesis at random and places it in the table

    OTHERWISE, it does NOTHING, without zeros sent to the table just waiting for the next true and only the values sampled at True remain in the table?

    2. How can I stop it pop samples (multiples of 1000 in my case)?

    In conclusion: I need to be able to take samples on the sample generator and store them in an array of 3d in a zig - zag (1.jpg) way, but able to think about it, we need to go beyond these two questions.

    Please ignore the meter.

    Please help me!

    TibiG wrote:

    Thanks, Crossrulz!

    This did not omit all values and it works fine.

    Is it possible to get information in a case without making use of the large loop?

    My program will become very complex (I need to synchronize a magnetometer and a stepper motor to make a 3d map of the magnetic field of the magnet) and I want to do everything as simple as possible.

    If there is a way to get information about a case structure, other tnan using registers with shift on the big loop, and you know it, please show me.

    Thank you!

    You could also use a Feedback node, just keep it out of the structure of the case.

  • Difficulties related to the Structure of the case

    Using a structure of the case, I had a problem with the structure of the case. I need the case structure to change a vlue as the case of entry provided.

    However, the entries of cases (boolean) I want to give the structure of the case are '<0' ,="" '="0'," '="">0' here I can provide only structure dealing with > 0 or<>

    How can I include the condition ' = 0' in the case of entry so that the structure of the case ".

    1 decreases the value of the parameter if the case is '<0' >

    2 does not change the value of the parameter if the case is '0',

    3 increases the value of the parameter if the case is ' > 0.

    I've included the VI that I work as an illustration.

    PS - the VI has a selector to change the input variable and has a digital indicator to display the output of the structure of the case variable. Thus, the digital indicator must be constant, if the input variable is not changed.

    Thank you in advance.

    As others have said, you can connect the digital directly to the switch case and create ranges.  Since you'll get weird rounded when using floating point data types, use the function Sign (in the digital palette) to convert your difference in [-1.0.1] and then use this result to the structure of the case.

  • How to stop queuing in the structure of the case

    I'm trying to find the Summit and the Valley of the signal. I'm able to find it, but I don't want to make the zero with the pic. I just want to get the value of Ridge and Valley. Is it possible to stop queuing the values in the structure of the case? As I have a several signals which peak/Valley must be found that I can't use the library functions.

    Kanye wrote:

    I'm trying to find the Summit and the Valley of the signal. I'm able to find it, but I don't want to make the zero with the pic.

    First of all, and more which has been mentioned, there are serious shortcomings, making the Subvi is not very universal.

    • Your Subvi does NOT export the correct value of the Ridge (or Valley), but the value just after (which is more a peak or a Valley!)

    • Your Subvi is only the positive peaks and valleys negative. This seems very restrictive. In general, you could easily have a Valley even if all the data is positive. Right? (With the exception of the Valley of death for example, most of the valleys are above sea level, for example )

    • Your code is extremely complicated, with two sets of structures of the case, each stacked three deep, four change records and tons of comparisons. Here is a simpler version. (To imitate your outings, place a statement select after each comparison and output the value or zero depending on the result of the comparison).

  • Help with the Structures of the case

    I have a problem switching between the true and false cases between the structures of the case. I'm writing a VI that generates a random number between 0 and 10 once every 0.5 seconds, and then adds the numbers until the total reaches or exceeds 100. At that time, it should start to subtract the number generated at random until it reaches 0, then switch again adding etc.

    I have a problem switching to the case of 'false' once the sum exceeds 100. If anyone can help with that would be great!

    To make things more simple exchange the Boolean value for an enumeration with only two values you can call "Count Up" and "Count Down".

    Create a second shift register to hold the enumerated value specifying whether to "Count Up" or "Count Down". Initialize the new register shift to count up, and in the case of "Count Up" in the structure of the case, increment the value of data and test to see if it is greater than 100. If this is not the case, do not change the value in the registry to shift direction. If data has exceeded the limit, change the values in the shift of direction register account to "Count Down".

    In the case of 'Count Down', decrement the value of data and test a value less than 0. When the value of the data is less than the lower limit, change the values in the change of direction of the County Register to "Count Up" and you're done.

    Mike...

  • Enum (type def) - structure of the case called update error

    Hello

    1. One of my (type def) enums is not updated the names of structure cases. I found something that looks like a probable error in the case where the structure,
    2. I had created one of the constants in the enumeration before I did a typedef. Therefore, I made new constants since the typedef and replace the original ones. and still, the structure of the case is not being updated.

    How can I solve this?

    also, I have one state machine inside the other. Is this right way to program?

    Somewhere in your code, you have the wrong typedef, or don't replace a control by the typedef. Must not have replaced all. I don't know if there is an easy way to search for; You may need to go through anyway.

  • Structure of the case is not updated after changing type "enum".

    Hello

    After changing a type of 'enum', the structure of the case has not been last updated - it still contain 2 States, while after modificatiion, it must contain 4 cases.

    Is this a normal behavior?

    Thank you

    Pavel


  • structure of the event within the structure of the case? error or limitation of LabVIEW?

    Hello

    I am trying to reach a structure of the event within a box structure. The event is triggered by a mouse event (mouse down, move to the top).

    This vi tries to simulate behaviour of the device with a sensor, so the mouse triggered the structure of the event, won't be there in real working environment, so I can't remove the structure of the case.

    But as I noticed that if I try to click on the drawing (that my mouse events are triggered with) before activating the Boolean condition of 2D, I can access is no longer the component front (button, leads, etc.).

    They seems to be frozen. But if the case is true before you try click on the 2D drawing area, everything seems to work well.

    Is - this protected by a kind of LabVIEW bug or there is a limitation?

    These are my screws.

    Thank you

    Hello Nefertari,

    Use a Standard Architecture.

    I changed the code. I hope now that its fine.

    Please find the code updated the joint.

    LV 2012.

    Kind regards

    Leila

  • Structure of the case: selector values are not unique

    Get the error: case Structure: selector values are not unique...

    With the help of producer-consumer architecture w / SW-events and comms of queue.  DevSuite - LV2014

    My loop of consumers use a typedef for case selection control.  The typedef is an enum and the names of text for each value.  All my files are in quotes and there are no duplicates in the typedef or structure of the case.

    Help

    JF

    Jeff.F wrote:

    Get the error: case Structure: selector values are not unique...

    With the help of producer-consumer architecture w / SW-events and comms of queue.  DevSuite - LV2014

    My loop of consumers use a typedef for case selection control.  The typedef is an enum and the names of text for each value.  All my files are in quotes and there are no duplicates in the typedef or structure of the case.

    Help

    JF

    I don't know what you're doing exactly what I think. Do not write text in quotes for values box. Wire the enum in the switch case, right-click on the structure of the case and select "add a case for each value.

    It might be a little different because I'm teliing memory.

    Ben64

Maybe you are looking for