Timed sequence

Hello

Sorry this is kind of a simple question, but I have two on the code, I write for my senior design project.

(1) my first question is how do you run a timed sequence by applying a switch. I want to "Reset Device", so I'll send a voltage of [5-0] my DAQ and after 10 seconds or more, he sends [0 0]. Can I use a while + case + stacked sequence all together? When I try to do, it gives me just a mistake.

(2) also, I have two 'modes' in my program. One where I order my camera manually (so forward, backward and stop) and the other mode when I reset my device so that he could bypass the manual and reset my device. I don't know how to set my program where he can do.

I will attach my code to give you an idea of where I am

Thank you

-Justin

no need to be sorry at this point in time, but you will defenitly find you with some difficulty afterwards if you don't change the code you wrote.

I suggest you pass by "thearchitecture of State machine" or "message in queue manager" (with the structure of the event to capture the user operations) (could be found in the templates provided by LabVIEW) to perform this task.

(1) you can perform the sequence timed something like this

(2) the state machine , is the Manager of queued messages waiting"(with the structure of the event to capture the user operations) will solve this problem easily. Cross delivered examples or serach ni.com for some example codes

Guru

Tags: NI Software

Similar Questions

  • Timed sequences. Is this the right choice and how it works!

    Hello!

    I am a newbie in LV, and I am creating a VI that is able to fly a small filtration unit I have build in my engineering studies.

    I have to control three magnetive valves which are connected to the Do0, Do1 and Do2 digital output on my USB 6009 MyDAQ device port.

    I have to control the sequence in which the valves open / farm as to avoid damage to the sensitive som of pressure transmitters. How to program a sequence of controlled time that opens and closes the valves in the right order, and in order reverse, repeat the sequential once a user defined timing?

    I have looked at the 'timed sequence' but could not find a "down to earth" description on how to use it.

    Perhaps my problem is a little in general. In this case I can certainly help with precision if necessary.

    I hope someone can help me with my problem. Now, I spent 6 hours looking at different tutorials without a bit of luck.

    Thanks in advance

    Henrik


  • How to stop a flat sequence (or timed sequence) which is inside a loop for

    The problem is this, I have a loop that repeats 10 times and inside this loop, I have a flat sequence (or timed sequence) with four images, each of this chassis to evaluate a different condition of a vector that I introduce.

    What I woud like for example is:

    I'm a fifth County of the loop for and in the case that part 2 does not meet the condition, the sequence of dish (or timed sequence) stops and starts the loop again but this time for the number of number 6.

    I would appreciate your response.

    You can't stop a sequence structure.  This is how they are made.

    What you should consider to get rid fo structures sequence and to change a state machine architecture.  There are many examples in LabVIEW, as well as on the Forums.  The big advantage of the state machine is that at the end of each State, it examines the conditions and determines which State then run. And that is exactly the description of the problem you are experiencing.

    Lynn

  • sequencing valve

    Hello!

    I'm relatively new to Labview (made an easy measure (analog, digital,...), but now have stubled on something new and do not know how to approach it.) Here's the problem:

    I have 2 taps with 2 solenoids. He valve is left 'EM happening in position 1, if she gets em right it goes to position 2. There is no signal, it remains in the position 0. On top with the number 3 and 4 are inductive switches. So what I would do is:

    Step 1: Valve1 and valve2 both get in position 1 at the same time.

    Step 2: When the top piston of the inductive current page switch stays valve2 (red number 4), position 0 for 2 seconds.

    Step 3: The two Valve1 and valve2 go in position 2. (the upper piston starts to move left)

    Step 4: When active switch inductive (Red No.3), new Valve 2 remains in position 0 for 2 seconds.

    Step 5: The loop is repeated.

    So the question is how to start to build the code for sequencing. Should I build code in the Structure of flat sequence, timed sequence or something else?

    Thanks for all the help you can give me.

    Much appreciated!

    Swear


  • How to read the multiple slave devices in a RTU modbus RS485 2-wire network without changing slave address manually?

    Hello

    Currently, I can read data out of multiple using the attached VI DAQ devices by manually changing the address of the slave on the front panel that determines what slave to read the data. However, I want the VI to do it automatically for me instead of me manually by clicking on the buttons on the front panel to change the address of the slave. In other words, the VI should read data off devices 3 slaves and save them to a database of all the 1 second (sampling from 1 sec interval). I tried to use the structures of the case, timed sequences and delays, but I'm still not able to get what I wanted. My current VI is a modified version of a VI library modbus - 'MB series Master query read input registers'. No idea how to do this?

    IM pretty new to LabVIEW, so don't kill me if im away here

    Could replace the cluster 'Series settings' with the attached structure solve this problem?

    The real deal will be just the value back to the default (1).

    -Tom

  • Run Subvi - specific time

    Hello people!

    I have a generic application that run a timed sequence of loop. Inside the loop, I tried to generate a random number and get him curent date when the number was generated. As you can see,

    For example: I put the period at 50 ms. In the ElapseTime indicator, the difference between two successive items varies between 47ms and Ms. 62, my intention is to get 50 for this diferrrence.

    Hi Samoth,

    no need to cheat. Simply use the output of 'Endtime Global"of the TimedWhileLoop...

  • Incorrect SCXI all the playback channels after running for more than 30 minutes

    I have a SCXI-1001 module. I use a thermocouple module (1102, breakout box 1300), input analog (off 2, map of 1100, 1300 in small groups), analog output (1124 map, 1325 breakout) and a relay (card 1160, breakout 1324). I'm using labview 2009. I created my channels manually to read all channels, I need about 1 task for entries of thermocouple and analog, 1 analog and 1 for task task for the output relay (total 3 tasks). Each task comes into contact with the SCXI area in a different section of a timed sequence. I read all my channels with precision for 30 minutes but then all of a sudden they stop reading accurately and all thermocouples read the same incorrect value as well as all analog input channels. I can't change the output channels either.

    The problem occurs more quickly if I increase the clock frequency. There are no errors showing when this problem occurs.

    What is an interaction of hardware failure or a software.

    Any help would be greatly appreciated. I also need to resolve this issue quickly because it is delaying the test.

    Thanks for your help

    Tim

    Thank you all for your response. I managed to solve the problem. It was a problem with the start of the task and to connect the clocks for different tasks. I've included only a single task to start my unstable code in the source code as for posed multiple startup tasks. However, I started my slave tasks (analog and digital outputs) before starting my master's work (analougue entered). This seems to have solved the problem. I intend to go more far by adding clocks at 2 slave atsks and linking them to the task of master.

    I used the sequence as part of documentation. Each links to sequence number to another sheet that I have has a flowchart to say what is each part. As you say there is no need to put in a sequence and do so limit labviews own data stream. I'll remove the sequences and put my documentation on the codes in the code directly because it is made in the examples of labview.

    Thank you for your help

    Tim

  • (How) Can I change the priority for execution vi when running

    Hi all

    I use the demons (free running VI) and I communicate them through queues.

    They are part of my architecture of device driver and use a producer (of the Acquisition) architecture or Architecture consumer (for control)

    I have a single VI demon I deploy an 'object of device' using a class polymorphic implimentation.

    This implimentation has a deficit of subtle,

    I'm not able to change the priority for execution to the launch

    There is a property node taunts that it is possible, but the assistance (and run the error message) says not available during execution.

    Anyone know of another method?

    Here's what I thought about so far:

    1. do you have 5 different demons with different priorities [Distasteful for the maintenance of the Code]

    2. make low priority and ensure that at least 1 VI in the driver has a highest priority [do not know if it works, mask implimentation]

    Kind regards

    Tim L.

    You might think about putting a timed loop or timed sequence in your daemon and then passing a value of digital priority to your demon. This is the best solution I can think.

  • 'Check if set to True, then continue' - how to implement?

    Hello community LV.

    I am creating a VI that checks if a certain condition (in this case, only the wavelength that is off my monochromator is the correct value) is set to true, then continues and takes the action. I tried to use a combination of a business structure and a timed sequence (see screenshot - I'm an autodidact and a newbie so sorry if it's a stylistic disaster), but the case structure requires that there is an entry from the case 'false' in the tunnel. Just that he do nothing if the case is false - I want all "false" entries would be added to elements of the table 'sum' and spoil my data (right?), so I don't want that.

    Thank you!

    If you expect something to be true, it means that you must keep a loop and test the condition until it happens.

    Heard that you work with an engine displacement and a series of steps that involve certain expectations between the two, it looks like you should develop a "state machine" architecture  Search the forums on this topic.  There is even a model for him in LabVIEW.

    A state machine allows a sequence of events occur, but you build in intelligence, so that he will know when to switch to the next step, or when to return to the stage even (for example to measure something and check the new State), or maybe even go back to an earlier stage.

    I see that you have potential competitive conditions in your current code of how you use local variables.  In the loop just For, you're current wavelength reading in 3 different places and write about it once.  But you have a race between when a reading and an update occurs and when it is read in two other places. Not sure if you have an old current wavelength or wavelength of current newly updated at each iteration of the loop.  Just look at your code, I can't even tell which way you want it to be.

  • Creating a Clone of VI in the real-time platform

    Hello

    I wanted to create a clone of VI in time real LV on cRIO-9022 controller. I changed the properties to run VI and selected pre allocated incoming running clone.

    But I'm unable to generate the clone like this.

    I read from here, "you can configure LabVIEW to allocate or share a VI clones reentrant clone shared within a structure ofloop delayed or Timed Sequence" .

    My question is how can we create a clone of screws in the RT platform? clones are limited to Timed loops only?

    I use LV 2013, cRIO-9022, chassis NI 9114

    Thank you

    Thibault

    Hello

    I got it, it was similar to what you do on a normal LabVIEW VI. I expect a change in the name of VI in CloneXXXX.vi, but in real time, I think that you do not have this indication.

    As he had no name and when I try to open the instances of these real-time clone live all were directed to the real VI itself, so I thought that it did not work.

    but I think that it how it is in real time.

    I did a test using the simple addition of numbers using clones and it works very well.

    If you do not get the clone of instance names when you open the front door and we cannot highlight the real-time performance clone VI

    I think it's obvious.

    Thank you

    Thibault

  • Machine state, case will not give out enum

    Hello

    I am doing a state machine, which, at specified times should bolster to the next State. I do not use a timed sequence because you cannot stop the sequence.

    My problem:

    The time is measured in the State. After 3 seconds, the comparison becomes true, and the withdrawal of the case should move from enum to enum 0 1.

    Exactly what it does not. The probe shows that the selectors from false to true.

    Something else that I noticed, the wire inside the casing complies with context-sensitive help ({unsigned word [16 bit - whole (0-65536)] {enum 1}}) the son out of the case are the same, except for the enum {1}

    What I am doing wrong?

    Welcome Margaret

    When using enumerations for a state machine you must always used a typedefed ENUM. You can avoid th eissue you see now. The typedef will be necessary to change the defintion (add or remove items) and automatically update all instances of this typedef (they can be controls, indicators or the constants) in your code. The stress points you see are the result of different types of data (Yes, an ENUM is a unqiue data type) wired bing on the same registry of tunnel or shoft.

  • reading and writing series sometimes works, sometimes expires

    I use the series on the VIs VISA to acquire data through an instrument.  After you have configured the port, I have send the instrument the order "AZK" followed of a newline (string hex "2A 61 7A6B 0D").  This brings the instrument to trasmit data.  When I do this in Hyperterminal with the same port settings, it works every time when I repeat the command as quickly as I can without any problem.  When I start my VI in LabVIEW, sometimes it works and sometimes it isn't (work maybe 25% of the time).  When it works, the data are displayed in an indicator very quickly.  When it doesn't work, I get a timeout error (10 seconds).

    I think the data string is ~ 330 bytes; Since I'm troubleshooting, I have it reduced to 20 bytes in order to ensure that the reading series is not waiting for more of bytes.  I also tried to extend the timeout, but it doesn't help.  Thinking this was maybe timing, sequence, or buffer related, I also tried to write and read in frames separated from one frame of the sequence and also tried an initial framework with clear VISA to clear the buffers before writing and reading, but none of this has helped.

    Any ideas why this might work a while but not others?

    I have attached a VI that I use to try to get this working.  (Note some data, the analysis of operations, as well as the VISA read a previous VI, but they have not been configured for this instrument of entry again and only the input string of reading indicator is significant at this time).

    If I can't get this to work, my rescue is rule automatically the instrument on trasmit on a certain frequency (like 1 sec) and acquire these data.  I was able to do this successfully with another device series.  But I wanted to be able to have LabVIEW to control the timing of transmission data as this unit has this capability.

    Thanks for any help.

    You can try adding a delay between characters like Hyperterminal does.

    And please don't say that you use the continuous run button. That would be a mistake.

  • Using the C-series SCTL DIO module with slower than the top level [FPGA] clock

    Hey all,.

    I'm running online research on a problem that I have a lot of success.

    I have a chassis with integrated FPGA, top-level 9030 clock 40 MHz.  I have a NOR-9401 DIO C Series module plugged and the value that will be managed by the FPGA target.  I need to count some linear encoders to exactly 10 MHz, no more, no less.  They are periods and gives a result of such kind that if I oversample or underestimate, I get garbage.

    If I create a SCTL and assign a source of synchronization derived from 10 MHz, I get an error code generation who:

    "Node read e/s for DIO3 FPGA is used in a clock domain that it does not support.  Areas of clock supported include: the clock of higher and clocks that have a rate that is a multiple of 40 MHz, for example 40 MHz, 80 MHz, 120 MHz and so on. »

    I tried several ways to work around this problem; First I tried just using a while loop with a loop set to 4 is ticking timer, but it then takes 9 clock cycles to perform the count for a reason any (although this code may compile in the SCTL without any problem).  I then tried to use the SCTL with a constant of 'true' AS a hack for a 'timed sequence' framework-related, and that certainly has not worked.

    Are there any strategies or techniques, or settings somewhere to work around this limitation on the AID I need to taste exactly 10 MHz?  I'd like to do this quickly in the software and get this rolling as soon as POSSIBLE.

    An image of the relevant section of the code is attached, I'm happy to provide you more things on request.

    Thank you very much!

    Maia Bageant

    Thanks for the reply!  The problem ended up being a hardware problem based on how coders were connected.  Now that I've fixed it, they're perfectly happy are oversampled.

    I guess my question is always legitimate to other applications, but not necessary for encoders a.

  • Random disconnects / reconnects WRT400N

    Thank you in advance for taking the time to read and answer my question (I hope).  That being said, I have a WRT400N wireless router that connects to the cable modem that we use for the internet.  This router connects to one computer and another router, which is another linksys, former model (EZXS88W), and who connects to a console Xbox 360, a laptop and a Wireless (Belkin) hub.  Today, I have experienced quick disconnects and reconnects not only on the laptop, but the Office upstairs is as well.  Disconnections are short and probably unnoticeable to the average user, but I play a game that requires constant access, and the xbox 360 fact as well for multiplayer.  I have determined, that it couldn't be my wireless belkin hub or my old linksys, since my real connection is not lost when it is on the laptop, then it had to be the modem from the isp or the WRT400N.  I gave to my ISP a call, and they did a diagnostic and reset on the modem, so everything should be good.  True that, everything WAS fine, for about an hour.  It disconnected after a bit of time, but I looked fast enough to see the 400N was literally stopping and restarting.  The last disconnection occurred 16 minutes ago, and I see if there are any timed sequence to disconnect her.  They are less common now than they were before, but it's really a concern towards the work and play games and if anyone of you has an answer to what to do, or have seen this before and know a solution you will have my gratitude.  I have put my explanation for easier understanding.

    Long story shortened: WRT400N connects to a desktop computer and another router EZXS88W. This router connects to a wireless belkin hub, an Xbox 360 and a laptop computer.  Ago intermittent disconnects followed by a reconnection is more than 2 minutes later. It cannot be the wireless hub or the old router, because there is no literal disconnect, as well as the office is affected as well.  To add to evidence that the 400N is the culprit, I have seen it perform a restart.

    Again, thank you for your time.  I will be waiting for responses.

    I could solve the problem.  It turned to be a program on one of the computers had not closed properly and has been hogging bandwidth.  Thanks for your help, however!

  • Hiow I can load image again and again

    my code is

    ---------------------------

    final NewScreen class extends screen

    {

    Domain Fimage = new WebBitmapField (url);

    Add (fimage);

    }

    ------------------------

    I want to re paint Fimage every 3 seconds

    How can I do this?

    He painted a single peak

    I guess that WebBitmapField is something you picked up.  From memory, it downloads an image.  Do you really want to download a new image and update the display every 3 seconds?  I guess you don't pay no data charges?

    The usual way to have a timed sequence of operations is to use the timer and TimerTask.  Take a look at the API to see how you might be able to use it.

Maybe you are looking for

  • After that Firefox v17 update freezes

    After that an update to version 17.0.1, whenever a web page is selected it 'freezes' on this page, only way out of Firefox is to go at the stop programme and management task.

  • Windows ME does not work on Tecra M3?

    Hi there I just bought a new laptop, it seems to be an older model Tecra M3 (PTM30U-OE8017, I can't find this anywhere model number on this page or other sites Web of Toshiba, I was wondering if someone could also help with recognition product. This

  • Pavilion F019wm 17: Warranty says expired but bought more than 3 years warranty

    Hello! I bought the HP Care Pack Services last November, but I get messages from HP Support Assistant saying that my warranty has expired. I have documents that contain warranty information and he entered the Care Pack HP site but still claims that t

  • Updated BIOS for Compaq F700 computer laptop Windows 7 OS

    I am trying to upgrade the BIOS for Compaq F700 computer laptop F.04 to F.08 worm! I can do it under Windows 7 OS (the sp39468 WinFlash file is recommended under Vista environment)? Thank you

  • How do I remove Regcure Pro and barrier to logic?

    How can I remove * (simply) and what should I put instead Forgive ignorance in the search for an answer to the question. I'm curious I thought as to how to remove * and hat w to replace with David . Original title: how to remove *.