Relay Testing with State Machine

Hi,
Yesterday I very kindly had some help from "crossrulz" in setting out the following procedure.  Today, the National Instruments representative called and said I should implement my programme as a "State Machine", which I have attempted in the programme attached.  I was wondering how I might now implement the procedures 3 to 5 in this State Machine format as it seemed very complecated in the brief time we had. 
What I am trying to do is test relays, using an automated test procedure.
The procedure takes the following steps:
1.       A NI9472  DO card and transistor drive turns the relay on/off via energising the coil (needs the time period to be variable).
2.       Counts how may cycles the relay contacts have operated, this will easily be in excess of 100,000 cycles.
3.       Every 100 cycles (again variable), the contacts are held closed, the load circuit (the current the relay is switching, which will be 15A at 30V) is disconnected, via another relay and a measurement is taken via a separate four wire method.  This consists of a 6V supply being placed across the contacts (switched in again via a relay) with a 1A current flowing through the contacts, the voltage drop across the contacts is then inputted into the NI AI NI9219 card (this is in the region of 10’s of mA) and is directly proportional to the contact resistance, which is what I want to measure.
4.       The measurement is taken and stored and the measurement circuit disengaged, the load circuit re-engaged, and another 100 cycles is counted before the process goes back to stage 3.
5.       This process goes on until the relay fails and hopefully a large set of contact resistance data is gathered.
I have no real experience with NI Labview.  
I have looked at the basic academic tutorials and have come up with the following programme for stage 1, however I can't get the DAQ Assistant to output every cycle
Would this be a very difficult programme to implement for the novice?  The academic tutorials seem straight forward but when I try to do someting it seems very difficult.
Hoping someone may be able to help, thanks
Andy
Solved!
Go to Solution.
Attachments:
Relay Test State Machine.vi ‏207 KB
Relay Test State Machine.vi ‏207 KB

Hi James,
I've tried to implement some logic as suggested.  I can now get the 1A coil to engauge after the nth cycle and I think it's taking a measurement, but can't seem to get the 15 A coil to disengauge at the same moment, which is crucial else the measurement will be across 16 A rather than just the 1 A.  Any ideas?  I just want to get it working so we can get started with testing.
I'm going to get my supervisor to book me on a course at Newbury for future projects, it's very difficult to pick up of your own back.
Kind regards,
Andy
(Helps if I attach it)
Attachments:
Relay Test State Machine.vi ‏209 KB

Similar Messages

  • How to use elapsed time function with state machine in Lab VIEW

    Hello
    I've been trying to use state machine with elapsed time function in order to sequentially start and stop my code. The arrangement is to start the code for 1 minute then stop for 5 minutes. I've attached the code, the problem is when I place the elapsed time function out of the while loop it doesn't work, on the other hand when I place it inside the loop it does work but it doesn't give the true  signal to move to the next state. 
    Could you please have a look to my code and help me to solve this issue.
    Regards 
    Rajab
    Solved!
    Go to Solution.
    Attachments:
    daq assistance thermocouple(sate machine raj).vi ‏436 KB

    Rajab84 wrote:
    Thanks apok for your help
    even with pressing start it keeps running on wait case 
    could you please explain the code for me, the use of Boolean crossing, increment , and equal functions 
    Best Regards 
    Rajab 
    OK..I modded the example to stop after 2 cycles. Also recommend taking the free online LabVIEW tutorials.
    run vi. case statement goes to "initialize", shift registers are initialized to their constants. goto "wait"
    "start"= false, stay in current state. If true, transition to "1 min" case
    reset elapsed timer with True from shift register(counter starts at zero)."time has elapsed"=false, stay in current state(1 min). If true, goto "5min" case
    reset elapsed timer with True from shift register of previous case(counter starts at zero)."time has elapsed"=false, stay in current state(5 min). If true, goto "1min" case. Also, bool crossing is looking for "true-false" from "5 min" compare function to add cycle count.
    Once cycle count reaches 2, stop while loop.... 
    Attachments:
    Untitled%202[1].vi ‏42 KB

  • Problem with state machine

    Hi! I've got a VI intended to control a storage tank. I've tried to do that by creating a simple state machine that changes the value(on/off) of some valves basing on 2 conditions:
    -when a certain temperature reaches a pre-set value AND its derivative is <0, the state must change from on to off,
    -when some time passes the state must change from off to on.
    Unfortunately I can't get this work as it never changes state (e.g if I start with on always remain on "on" and viceversa).
    Could you please tell me what I'm doing wrong? I'm attaching the screenshots of the 2 states.
    Thanks!
    Solved!
    Go to Solution.
    Attachments:
    screenshot1.jpg ‏302 KB
    screenshot2.jpg ‏300 KB

    It looks like your shift regsiter might not be wired correctly.
    Attachments:
    screenshot1.jpg ‏303 KB

  • Running SubVIs with state machines in parallel

    Hi,
    I'm new to labview, working on it for a couple of weeks.
    I'm building an application where there are a number of identical elements atht each is controlled by an identical state machine which is independent from all others.
    My problem is how to place each state machine in a subvi and running them in parallel.
    Each of the subvi has a while loop for the state machine, and the program gets stuck inside never entering another subvi.
    Is there an elegant way to run a couple of SubVIs each holding a state mchine in parallel?
    I come from the VLSI world so there is no problem implementing this kind of logic in hardware description language but the labview way to do it eludes me...
    thanks you very much for any help,
    Eyal.

    braxat2000 wrote:
    Hi,
    Thank you everybody for your kind help.
    The problem was solved and my application is OK now.
    For future reference,
    I used the execution reenter subvi to allow multiple instances of it in parallel, and added a global variable that the subvis can change, and the main can read from.
    Used semaphores to make sure correct parallel write to common sources.
    Cheers,
    Eyal.
    Great solution- but how to avoid race conditions in the global variable?  Globals are notorious for causing headaches, nightmares and nausea so if there is a way to avoid them and enforce a bit of cause- effect its highly desirable.  In this case you have clones of a re-entrant vi running in parallel so you CAN'T use a functional global (the most common solution see Ben's famous Action Engine nugget)
    Since we can't enforce data dependence we need something else as a cause-effect team..... Change event dependency would be a good substitute.  Two methods for getting this type of dependence would be a dynamic event or my favorite the "Named Queue"  set the data type of the named queue as a cluster of instance of source and data from your global and the main loop will be able to see EVERY write to the queue AND the source.  Moreover the queues datatype can be expanded to offer any information the main vi needs to be a good executive. In fact a new sub vi that "monitors status" of the clones would make the application highly scalable and robust. 
    Jeff

  • Help with State Machines

    I am implementing my application using state machines, and I have the following problem.
    1. I have an initialized state that will initialize my controls.
    2. Next I want the next state to check for user input.(boolean button will be pressed to determine which state is next).
    3. In one of the states, I want the user to be able to change the initialized values, and afterwards go back to the user input state, to determine which state is next
    I have implemented the initialize state as well as the user input  state(use event structure for that state), but I do not know how to let the user be able to change the values of my control , then the user acknowledges the change, and the state goes back to the user input state waiting for the next state.
    Thanks for any help
    Solved!
    Go to Solution.

    Thank you Ravens Fan, I did not really understand your message. I have a simplified version of what I am trying to accomplish.
    1. I have 3 controls and one indicator
    2. When the Vi is run , the controls should initialize to the values in the intialize state. The next state will now be the user input state.
    3. When at the user input, the user can either press the "analyze button" and the result will be displayed in the indicator. or the the stop button to stop the simulation, or
    4. The user can change the values of the control, after all the controls have been changed to his desired values, he can then press "accept values" and the state goes back to the "user input".
    Thank you for any help
    Attachments:
    example.vi ‏26 KB
    example control.ctl ‏5 KB

  • How can I establish an enum typedef for use with state machines and action engines?

    Hey all--
    I have an action engine with several instances.  Any time that I add a method to the engine, I have to modify all of the calling code to update the constant that determines the method being called.  There must be a smarter way to address this problem but my LV experience is insufficient to identify it.  Can any of you wiz-bangs tell me if it is possible to make a type def (I can do this) and use it with each instance of the action engine call so that changing any instance also updates the typedef?
    Thanks.

    Take your enumerator.  If it is not a control (ie constant), change it to a control.
    Under File Menu, select New > Custom Control.
    Move (or copy) your Enum Control to the Custom Control.  Change the Control to Strict Type Def (the selection to the right of the wrench).  Save it.
    (EDIT: ** OOps, the picture shows the wrong one.. sorry**)
    Copy that new Strict Type Def control to your code.
    See images below.
    OR.. If you're using LV8.x, and using a project, I would recomment that you do it from within your project explorer.  Simply insert a new "Control".  The rest of the steps are similar, except that you can insert it from your project. 
    R
    Message Edited by JoeLabView on 07-08-2008 06:47 PM
    Attachments:
    TypeDef.PNG ‏33 KB

  • State machine VS producer consumer architecture - Time Analysis

    After learning various methods to program efficiently and learn how to use SM and Producer consumer. I built a program to control stepper motor in both these techniques.
    Here is the RESULT. As we can see a simple state machine without any complicated producer consumer technique performs faster than the second one.
    I am not sure which is still the best based on performance and optimization. Please advise which one should I keep and why.
    Abhilash S Nair
    Research Assistant @ Photonic Devices and Systems lab
    [ LabView professional Development System - Version 11.0 - 32-bit ]
    LabView Gear:
    1. NI PXI-7951R & NI 5761
    2. The Imaging Source USB 3.0 monochrome camera with trigger : DMK 23UM021
    OPERATING SYSTEM - [ MS windows 7 Home Premium 64-bit SP-1 ]
    CPU - [Intel Core i7-2600 CPU @ 3.40Ghz ]
    MEMORY - [ 16.0 GB RAM ]
    GPU - [ NVIDIA GeForce GT 530 ]

    This is with state machine alone
    Abhilash S Nair
    Research Assistant @ Photonic Devices and Systems lab
    [ LabView professional Development System - Version 11.0 - 32-bit ]
    LabView Gear:
    1. NI PXI-7951R & NI 5761
    2. The Imaging Source USB 3.0 monochrome camera with trigger : DMK 23UM021
    OPERATING SYSTEM - [ MS windows 7 Home Premium 64-bit SP-1 ]
    CPU - [Intel Core i7-2600 CPU @ 3.40Ghz ]
    MEMORY - [ 16.0 GB RAM ]
    GPU - [ NVIDIA GeForce GT 530 ]
    Attachments:
    Control 1.ctl ‏6 KB
    Control 2.ctl ‏6 KB
    Motor-UNI_Directiona Dev 3-TIME_ANALYSIS-2.vi ‏54 KB

  • State machines caveat

    I have been using the state machine design pattern in programs for a
    while. In this technique, it is a common practice to define boolean
    switches to trigger actions in the next iteration of the machine (eg.
    "TurnLaserON", "Quit", "Compute", "SetAlarm1"...). Thus, the boundary
    between data and processing is easily trespassed.
    This sounds to me like a possible source of errors, that should be
    limited by some design rule of thumb. I tend to believe that boolean
    triggers in state machines should be looked at with the same precautions
    as a "GOTO" control structure.
    Do you have any experience or theoretical frame to enlighten these
    considerations ?
    oz

    Hi,
    I always prefer a state machine with a state buffer. This means, every state
    can, potentially, call several other states. In practice, there is a shift
    register with an array of strings in it. The first string is called, and
    removed. Every state can modify the buffer, so:
    + states can be put before, after or between the buffer
    + states can be removed
    + states can be filtered, sorted etc.
    + buffered states can be copied
    This makes programming with state machines a lot easier. You can simply make
    a state TurnLaserON, and in the calling state(s) diside what the state after
    TurnLaserON has to be. This makes the program a lot clearer.
    Some design rules I use (mainlly because if I don't use them, there is no
    way of documenting the program):
    + states may only put states before the buffer (I call them sub states)
    + buffered states cannot be removed in a state
    Using these rules, I can put the entire program on paper, without any
    problem.
    Still, I have to transfere information between states. This 'information'
    can be a shift register with a bundle, indicators on the front panel (not
    visible to the end user), a GLI, buffers, ini file reference, or whatever. I
    have never found any big advantage or disadvantage for eny of them, but I
    prefer indicators (mixed with buffers when convenient), because they are the
    fastest to use (for me), and easiest to debug (IMO).
    Regards,
    Wiebe.
    "O. Zimmermann" wrote in message
    news:[email protected]...
    >
    > I have been using the state machine design pattern in programs for a
    > while. In this technique, it is a common practice to define boolean
    > switches to trigger actions in the next iteration of the machine (eg.
    > "TurnLaserON", "Quit", "Compute", "SetAlarm1"...). Thus, the boundary
    > between data and processing is easily trespassed.
    >
    > This sounds to me like a possible source of errors, that should be
    > limited by some design rule of thumb. I tend to believe that boolean
    > triggers in state machines should be looked at with the same precautions
    > as a "GOTO" control structure.
    >
    > Do you have any experience or theoretical frame to enlighten these
    > considerations ?
    >
    >
    > oz
    >

  • Allow state machine while loop to end only in 1 of the states?

    What is the best way to ensure that the while loop that surronds state machine case structure only ends in a certain one of the states?

    I have solved the problem of having the VI not stopping (apparently it was due to an event structure). However, now I have another slight problem. I need the state machine to terminate on either of two conditions:
    1) If a stop button is pressed
    OR
    2) if the end of the sequence is reached.
    As I have implemented it so far the VI terminates because of the second condition and does not allow me to terminate it by pressing a 'Stop' boolean button. I know that this might be a bit fundamental and simple but I'm new with state machines on labview.
    Thanks.
    Attachments:
    State machine.vi ‏21 KB

  • How to use a event structure with a state machine

    First, I would like to inform you that I only work on LabView part time, and have much to learn.  Anything I do learn, I usually forget until I need it again, because I only work on it part time.
    Using your StopWhileLoopMOD[1].vi, I am trying to put a state machine inside the event structure.  
    Related link: http://forums.ni.com/t5/LabVIEW/How-to-stop-while-loop-in-Event-case/td-p/465564/page/2
    Here is my application:  on the front panel, the user can select any combination of 7 different tests.  I have created cases to perform each step of each test in the correct order, but if the user presses stop, the tests won't stop because some of the cases have a while loop inside the event structure (like you mentioned is a bad idea).  The user should be able to stop the test, reselect tests to perform, and re-start the tests. 
    When the start button is pressed for the event structure, I need all the cases to run in the proper order, unless stop is pressed.
    In the past I have indexed an array and used that to run the state machine, but it won't stop immediately.  
    I have sub VIs that are built in while loops because the outputs of the product needs time to stabilize.  The state machine stops and waits up to a certain number of iterations.  If it passes the test, the while loop stops and the next state starts.  If it takes too long, it exits and reports an error.  Maybe I need to just use the state machine and not an event structure?
    Is there a good example of an event structure?
    metzler CLAD
    Solved!
    Go to Solution.

    I'm not sure exactly what you are asking, but it sounds like you want to script a bunch of tests and if the user says stop, to immediately stop the current test and abandon the others?  I'm going to assume that you know how to clear the array so that it will abandon the others, so I'm guessing that you are having trouble abandoning the current test?  If this is indeed the case, then the problem is that you are not able to propagate the message from the main VI FP which is the GUI to the sub vi which is the test, where the test may or may not have a GUI (FP visible) of it's own.  Threading was the first thing to come to mind, but this may not be necessary using events.
    You can do this by passing a refnum of the stop button to the subVI, where you can then add that wait to the event case structure.
    I've attached 2 VIs, mainvi.vi which is just a loop displays the count*2 (number of seconds passed since running) that will call subvi.vi and then check to see if the stop button is pressed.  mainvi.vi is by no means a state engine, it is just a simple loop for demonstration purposes.  subvi.vi just waits 2 seconds and leaves, it is a better structured state engine with an init state to start a poll case to wait for events and an exit state to clean up.  You can modify this any way you wish to get it to do what you want.  You will note that even if subvi.vi is being executed, it will terminate immediately when the stop button is pressed.
    Hope this helps.
    A
    Attachments:
    mainvi.vi ‏17 KB
    subvi.vi ‏33 KB

  • New LabHSM Toolkit - Agile development of complex event-driven maintainable LabVIEW applications with active objects / actors based on a universal Hierarchical State Machine / statechart template.

    Dear Fellow LabVIEW programmers:
    Most of the systems you deal with are reactive. It means that their
    primary function is constant interaction with their environment by
    sending and receiving events. But most likely, they can have something
    happening inside them too, even when they are not processing messages
    received from outside. So, such systems have to continuosly react to
    external and internal stimuli. Right? Moreover, most likely, they
    consist of subsystems that are reactive too and, in turn, can have
    their own "life", to an extent independent from other parts (with
    which they still communicate, of course). Reactive (event-driven)
    systems are more naturally modeled with active objects. So, why then
    should we try to model and code them with GOOP and its passive
    ("dead"!) objects?
    "Flat" State Machines have been known for decades to have severe
    limitations. It's been more than 20 years since Dr. Harel invented
    Hierarchical State Machines (statecharts) to fight those limitations.
    Then why does NI still tout the same old good Moore FSM as the
    ultimate tool for event-driven programming in LabVIEW in its $995
    State Diagram KIt?
    The LabHSM toolkit we are happy to present, makes it possible to
    easily create and then maintain complex event-driven applications in
    LabVIEW as a collection of HSM-driven active object VIs using a higher
    level of abstraction and agile software development methodologies.
    These active object VIs are created based on a universal Hierarchical
    State Machine ( HSM or statechart ) template. So. all your code looks
    similar regardless of its functionality!
    We all love just jump to code, right? However, to be good boys, we
    need to do design first. Then implement it in code. If the logic is
    modified we need to redo the design first and then redo the code. When
    using LabHSM where behavior information is abstracted into a separate
    HSM data file editable with a supplied editor, there is no need for
    coding separate from design any more. The modified behavior becomes
    code automatically as soon as the HSM file is saved. Design is code!
    The implementation basically follows Dr. Samek's Quantum Programming
    paradigm. (see http://www.quantum-leaps.com). However, as already
    mentioned, LabHSM stores the behavior information in a file separate
    from the code itself. It also adds state dependent priorities to
    events, a separate queue for public events/messages, and, of course,
    some LabVIEW specific code like capturing front panel user events and
    putting them into the private Events queue. Communication and
    instantiation functions are also rather specific for LabVIEW.
    It is available for UNLIMITED PERIOD trial. Please visit
    http://www.labhsm.com for details and download. The site also contains
    references which you may want to check to learn more about
    hierarchical state machines and active object computing.
    Since this is our debut we will appreciate any comments and
    suggestions. Our contact information is available on our site, of
    course.
    Have a G'day!

    Symtx is currently hiring the following position. Please contact me if interested.
    Amy Cable
    Symtx, HR
    [email protected]
    Symtx, the leading supplier of functional test equipment, hires the brightest & most talented engineering professionals to design & manufacture complex custom electronic systems for advanced technology leaders in the defense, aerospace, communications, medical, transportation & semiconductor industries. Symtx’ challenging & dynamic work environment seeks to fill openings with highly qualified electronic engineering design professionals.The ideal candidate will be responsible for defining the requirements, software design and code development, and integration of test control software for custom functional test systems. Candidate should be familiar with data acquisition concepts, instrument control, complex test, measurement and calibration algorithm development and definition and implementation of control interfaces to hardware. Prefer familiarity with instrument control via GPIB, VXI, MXI, RS-232 desirable. Requires BS/MSEE and 3 -7+ yrs of experience in one or several of the following test applications in a Windows NT/2000/XP environment using Labwindows CVI, TestStand, Labview, Visual Basic, C++ and knowledge of RF systems is a plus. Job responsibilities will include software design, development, integration, team leadership, and interfacing with customers( includes PDR’s & CDR’s).

  • Double Click Property Node not functioning with Queued State Machine

    I am writing an application which relies on input from the operator to start different steps in a process of steps.  I am using a queued state machine, however I cannot get the Double-Click property of my listbox to function with in this Queued state machine.  I have tried Creating a refrence to the Listbox and creating a property node from that refrence.  I have tried a property node of the control.  The double click functon works only if the queueing is not occuring.  It has something to do with the queue but I am at a loss as to what is causing it.  Any help would be GREATLY appreciated.  I have attached a simplified version of the state machine with the double click function.  Thanks for any help on this.  It is written in LV7.1
    Attachments:
    Test Q.llb ‏55 KB

    Hi
    Its  Simple....
    Your Properrty node is not getting read..... dont understand how..
    see the attachment...
    now laugh at your small mistake... (even i have the habbit of making such small mistakes ;-) )
    Message Edited by Tushar Jambhekar on 01-11-2006 11:38 AM
    Tushar Jambhekar
    [email protected]
    Jambhekar Automation Solutions
    LabVIEW Consultancy, LabVIEW Training
    Rent a LabVIEW Developer, My Blog
    Attachments:
    Test Q.llb ‏55 KB
    Picture.JPG ‏44 KB

  • I have defined a finite state machine: pb with button : they need to be click twice

    I have defined a finite state machine and also defined a call to a C dll enabling to kill processus  since in my state machine I have to sequence several exe and being able to interupt them (This is the goal of mu manageProc dll)
    for the moment I make my integration test with the notepad.exe process
    the create and kill seems to work
    but I have problem wth my finite state machine I need to click twice on the differnts button for a given state to be really effective
    I have also used glabal variable and an event controller ( without that I was unable to get ffedback oo buuton click
    So my question are
    Is my problem due to the use of a shift register
    Please tell me if you need other file to understand my problem
    Regards
    Thibaut
    Attachments:
    Spectro State MAchine .vi ‏77 KB

    Thibaut,
    You should put the event structure into its own parallel while loop rather than sharing the loop with the state machine. Typically the terminals of the controls will be placed inside the event case where they are read. At least inside the loop.
    Run your VI with execution highlighting on (the light bulb on the diagram toolbar). This will show you how dataflow works.
    You probably do not need most of your global variables. Appropriate use of shift registers and wires would eliminate them.
    Lynn

  • Producer Consumer with a state machine within the consumer

        Hi All,
    I have been trying to develop a data acquisition system with the producer consumer architecture.  To the left of the two main loops I initialize the serial port and any constants and variables im using.  I also have an obtain queue VI needed for enqueue and dequeue. Then in the producer loop i have a state machine.  The first state is where I wait for a button press on the front panel to write a GO signal on the serial line which will tell the device connected to the serial port to begin sampling data.  After this button press I go into the next state which is called my read state.
    In the read state I use a property node to read all of the available bytes at the serial port and then enqueue this collected data into a queue.  The state machine then is directed to continously go to the read state again and collect more data.
    Now this is where my dilemma is......  The consumer loop has the dequeue VI inside it and after this VI i have a state machine (while loop and case structure) which contains the following states
    1.  Build Array - build an array from the dequeue element and if there is any left over data from the parsing states it will build an array with the left over data and the dequeued data
    2.  Determine packet type - this state looks for the packet type byte(not necessarily the first byte in the message) and also check the next byte (packet length) to ensure that I am at the begininng of this chunk of data.  This state may be a little slow because there can be three different packet types and based on this byte and the packet length it may have to search the array several time to find the valid starting point.  This state also determine the next state to go to based on the packet type.
    3 packet type 1 parsing - parse data and store the remaining data it leftOver array.  Go to exit state.
    4 packet type 2 parsing - "" ""
    5 packet type 3 parsing - "" ""
    6 exit - leave this state machine and fall back to the consumer while loop.
    After it exit I think it should fall back to the consumer while loop and dequeue more data and enter the state machine again to build a new array with the dequeued data and leftover data.  It seems to work when I trace the execution using the Highlight execution feature, however when I run this all at full speed, it seems to go into the consumers 1st and 2nd states back and forth and not completely go through the state machine.
    I tried adding in a delay in the producer loop to give the consumer loop time, but I didnt notice any difference.  Is it possible that my dequeue element is retreiving more data while im still in the state machine, causing the execution to leave the state machine before it finished all states?
    Is there a better approach to take to solve this problem. Basically I need to read data at a 1,000,000 baudrate and parse it as quickly as possible so that I can break it up into 3 different packet types, write the data to a file, and graph the actual data (header info removed) in realtime.  I need to also ensure that I am not losing any of the collected data.  Data loss cannnot occur.

    A couple of things more to go along with Ben's pointers:
    You convert your data from a string, to a U8 array, to a Hex string array in the producer loop, then convert back to a integer to determine what to do with it.  In the process, you create two or three copies of your data, slowing yourself down quite a bit.  The code would be quite a bit more efficient if you left the data as a U8 array.  You can change the format of the controls and indicators to show hex values instead of integer by right clicking on them and selecting Format and Precision...
    Your search code is fairly inefficient.  I made a whack at making it a bit better.  See attachment below.
    If you continue to run into race conditions, you can debug them using a calls to the Windows debug write sprinkled liberally about your code.  Check out the post here for more information.
    Don't let your lack of format LabVIEW training stop you.  The biggest thing to get is the data flow paradigm (aka data is wires, not registers).  Once you get past that and learn how to pass data around using shift registers, queues, events, etc, you are most of the way to mastering LabVIEW.  The rest is just learning the plethora of functionality LabVIEW gives you (yes, I have reimplemented LabVIEW native code more than once in the process of learning).
    Let us know if you need more help.
    This account is no longer active. Contact ShadesOfGray for current posts and information.
    Attachments:
    serialUtil_V3_DFG.zip ‏137 KB

  • Other events interfere with abort for state machine started by an event

    In the attached VI there is a state machine that is triggered by a boolean “start” change event.  There is also a boolean “stop” that stop the state machine, a numeric “voltage” that has an event handler and a boolean “exit” that has an event handler.
    The stop button works as expected unless if the voltage value is changed before the stop button is pressed.  I was thinking this might be because there is an event for the voltage value change but there is also an event for the exit button value change and the problem does not occur if the exit button is pressed before stop.
    If anyone could explain the reason I am only running into the problem with the voltage value change and/or how to properly implement the stop/abort function I would appreciate it!
    Thanks,
    Dave (LabVIEW 7.1)

    Well that certainly solves the problem I was having!  The case in a while in a case in a while reminds me of the 10-level deep if statements I used to end up when starting C programming.  I guess the inner case/while are required for the state machine and the outer while is required for the Producer / Consumer.  I always find myself thinking in terms of "if/then" statements and the case/comparison took the place of that. 
    Regardless, problem solved.  If anyone has tips on how to make it (attached) look better, please post them!
    Lynn, I wasn't quite sure about your instructions on passing the exit and stop commands through the queue.  I went with the idea of keeping the long-running loop separate.  I know I still have a bit more to work out such as use of exit button while state machine is running, and the stop button only works in between state machine iterations.
    Message Edited by davey31415 on 11-27-2006 07:04 PM
    Attachments:
    PowerfoldMeasStat.vi ‏158 KB

Maybe you are looking for

  • How can we trace the logs of sap t001b table

    hi. can we maintain the logs for table.eg T001B.through which we can check its when this table has been change by which user... Ishtiaq

  • OCI crash while executing PL/SQL

    HI, I have a multithreaded application which uses OCI. The application has a master thread and spwans 4 child threads that connect to the db and execute specific queries. The problem occurs while trying to execute the last PL/SQL command which includ

  • Generics bug with multiple interface inheritance?

    Hi, I've noticed what I believe to be a compiler bug (I am getting an error where I believe none should exist). Can someone please comment on the following use-case? interface Interface1<SelfType extends Interface1<SelfType>> interface Interface2 cla

  • Can't install itunes (vista)

    i've tried for times.... it keeps telling me" This installation could bot be opened. Verify that the package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Installer package."........

  • OES2 Cluster on VMware ESX

    Has anyone installed an OES2 cluster on VmWare ESX successfully.