02-11-2013 05:29 AM
i 'am trying to run a motor which takes the commands as three ascii words of on byte length. I need this motor to function when the case is always true. So I added sequence(stacked) loop inside the case loop with each sequence carry a byte length word. But finally case loop shows a error that selector terminal is not connected. But it is connected as true or false. what I have to do run the program in the way I wished. Please reply
02-11-2013 05:33 AM
Post your vi please.
02-11-2013 10:43 AM
Yes, please post your code. Also, I doubt that you need a sequence structure. You should be able to dictate the order of operation by using data flow. LabVIEW is a data flow language. In the most basic case you achieve the necessary data flow using the error out and error in.
02-11-2013 09:40 PM
I put sequence loop and tried then it shows case loop have a missing selector value . that's the problem I 'am facing
02-11-2013 09:54 PM
You forgot to attach your code to your last message.
02-11-2013 09:55 PM
ok i will sent
02-11-2013 11:17 PM
Hi Mark_Yedinak,
If inside case strucure there are operations which is indepndent of each other but need to be done serially then sequence structure is needed becasue labview will always try to execute the code parallely(if they are independent).
I am just curious about your line
*******************************************************************************************************************************
In the most basic case you achieve the necessary data flow using the error out and error in.
*******************************************************************************************************************************
I didnot understood this line. Can you please elobrate this or any dicument will be great help (Just for learning).
Thanks
02-11-2013 11:22 PM
I'm sure it is in LabVIEW Basics or the tutorials. A node can't run until it has all of its inputs. If one of those inputs is an error wire that comes from another function, then by definition of dataflow, the node can't execute until the function supplying the data on that wire completes.
02-12-2013 12:21 AM - edited 02-12-2013 12:22 AM
Hi RavensFan,
Like i said two independent loops. But unserstood what he wants to say.
Thanks a lot.
02-12-2013 09:28 AM
@Ranjeet_Singh wrote:
Hi @RavensFan
Like i said two independent loops. But unserstood what he wants to say.
Thanks a lot.
You are generally better off using a more robust architecture like a state machine than using sequence structures. Sequence structures are very inflexible. Once you enter it you must execute every frame. Also you cannot exit early if you needed. A state machine is much more flexible and easier to maintain. Sequence structures are very rarely required when you use good data flow and good design patterns.