A "resettable" switch

Hello,
I recently started programming again with LabView (after a 7 year hiatus). I am trying to write a program to control a syringe pump. However, to make a long story short, right now I am using a program called KernelPro to virtually create a pair of serial ports connected via a virtual null modem cable. My LabView (version 2011) program can write a string to one port (COM 1) and read the same string from the other port (COM 2). I assume this means that once I hook up the pump, I will be able to communicate properly with it.
Commands will need to be sent to the pump to do things. For example, "Move down to postion 10. Then dispense. Then retract. Repeat this 5 times". Currently, my program can do this (via an assortment of letters and numbers sent in a string to the motor). I envison that the program would roughly work as follows:
1. User inputs the desired parameters.
2. User clicks "Do this"
3. Software sends command to pump.
4. <Idle>
5. User inputs new parameters...
6. Repeat 2-5.
Right now, I have a boolean LED ("send command") which activates a T/F case structure. Inside the structure, the serial ports are initialized, and one serial port is sent the command which is read by the second, and the string is then shown to the user via an indicator on the front panel. Again, as this is a virtual null-modem, the input and output strings are identical.
When running the program in continuous mode, as long as the boolean LED is toggled true, any changes in the commands are sent to the serial ports in real-time (and I can see that it is being read correctly in real time). However, I don't think that I want this to be the case. Referring to my steps above, steps 1-3 work fine, but there seems to be no step 4, and step 5 goes instantly to step 3, skipping step 1 and 2.
I think I need something like a one-time-use switch, which will send a command but then reset itself to the "off" postion. Of course, my program as written should work (I think!), but the user would have to manually turn off the "Do this" switch after turning it on.
Is there a switch that can do this automatically? I tried While loops, and looked into shift registers, but nothing seemed to work for me. Again, I just started using LabView again, so I don't remember much!
Any help would be appreciated. Thanks in advance!
-B

Yes, a whike loop is needed. Continuous run is a debugging tool and should never be used outside this narrow purpose. You only need to initialize the serial port once outside the loop, and not with each button press. Design your vi as a proper state machine to make it readable, expandable, and maintainable.
See how fer you get. Feel free to ask more detailed questions if you get stuck.
LabVIEW Champion . Do more with less code and in less time .

Similar Messages

  • My Titan died!!! Does the GT80 Titan have a reset switch?

    Greetings,
    When I purchased my GT80 Titan notebook a few weeks ago, I knew that it didn't have a user-removable battery. But I was shocked that I couldn't find a reset switch when I needed one!
    After working late Friday night, I turned off my Titan. The next morning on Saturday I tried to turn it back on but nothing happened. Nothing lit up. The display was dark, the power button stayed dark, the keyboard was dark and the WiFi, Power and SSD/HD LEDs along the front were all dark.
    I had been using the AC adapter Friday and the battery was fully charged when I shut the Titan down that night. The AC adapter had been connected all night and was on and working now. The Titan had also been connected to my network via gigabit ethernet cable.
    Since it had rained Friday night, I wondered if there had been any electric surges or if static had built up inside the notebook. I doubted the AC adapter would be the source because it was plugged into a full sine-wave UPS and was well protected from any irregularities on the power lines. That left the ethernet cable which connected to a router in my cable modem as a possible source.
    There was just one other possibility (that I could think of): a defective lid switch. If the lid switch had failed, my Titan might "think" the lid is closed even when it is not. This could also prevent it from turning on. I hoped this wasn't the case because my Titan was not even 2 weeks old and had been handled like a baby. I expected more robust construction for a flagship product like this.
    Since it was Saturday, I couldn't get help from MSI. The problem was: I needed my Titan to finish a job that weekend. What to do?
    Normally, the first thing to do would be to unplug the notebook. Remove its battery. Press and hold the power button for 10-30 seconds to discharge any static present. Wait a few more minutes to allow any energized capacitors on the motherboard to "loose" their energy. Then re-install the battery, hook up the AC and try to start it again. This usually solves the static problem.
    But that's a non-starter with the Titan because you can't remove the battery. So I hunted for a reset switch. You know the kind: a tiny hole through which you insert an unbent paperclip to press a tiny button which temporarily disconnects the battery from the motherboard. But I couldn't find one. The only paperclip hole I could find was the one in the blu-ray drive (to mechanically eject the tray).
    I thought: "Maybe a key combination will do a reset." So I tried pressing and holding the Power, GPU and Fan buttons in various combinations but they didn't seem to do anything. Finally, out of ideas, I did what I didn't want to do and started to open the case of my Titan.
    I removed the bottom panel (12 screws) and top panel and carefully examined both sides of the motherboard as best I could, looking for a reset switch---but never found one.
    Next, I carefully examined the battery cables (left front corner when viewed from the bottom). Normally, you have to remove the left fan and GPU heat diffuser in order to access the battery cable connector on the motherboard. This would be a major job that I wasn't willing to undertake. And this is the only way to disconnect the battery as far as I can tell.
    But it looked like there was enough room to disconnect the battery cable without removing the fan or heat diffuser. Sure enough, with care and a thin flat-blade screwdriver, I was able to push the connecter away from the motherboard, removing it. Mission accomplished---battery disconnected!!!
    Next, I pressed and held the power button for 60 seconds (with all the trouble this took---I wanted to be sure I discharged the static). Then I let my Titan sit for over 40 minutes with the battery disconnected so there would be plenty of time for an residual energy to dissipate from the capacitors on the motherboard.
    At last, it was time for reassembly. It was trickier to reconnect the battery connecter than to disconnect it. You have to be very careful not to push on any wires---just push on the plastic part of the connector with the screwdriver. Once you get the connector aligned properly with its socket on the motherboard, it will slide in easily.
    Then I replaced the bottom and top covers and tried to turn on my Titan. It still wouldn't start. Next, I connected the AC adapter and, Voila!, the power button worked and it started. As soon as Windows had booted up, I checked the battery's power level. It was at 98%---almost a full charge just as I had expected.
    I was very glad to resurrect my Titan on Saturday when MSI tech support wasn't available. And, any time rain is in the forecast, I'll be careful to disconnect my ethernet cable after I've turned off my Titan. But I was very angry at not finding a reset switch of any kind. Surely this notebook has one and I just didn't see it. Who would build a computer device of any kind with a non-removable battery and fail to provide a reset switch. It's unthinkable to me.
    So I have to think that there must be some easier way to "reset" a GT80 Titan if it ever visits static twilight land again. If someone reading this topic can contribute some information, it would be greatly appreciated.
    WARNING: What I did to my Titan (taking it apart and disconnecting the battery) is NOT recommended for novice users. This requires great care because many of its components are highly susceptible to static damage. You need to ground yourself to the chassis while you work on it so that you have the same potential as it does. If this really is the only way to "reset" a GT80 Titan, then you'll need to take it to someone qualified to do it. Don't turn your expensive Titan into a brick!!!
    Kind regards, David

    Quote from: chc on 18-May-15, 12:07:19
    If you meant EC reset, you just need to press power button for about 12 seconds.
    Thanks chc,
    Every bit of new information is helpful toward documenting the "undocumented" features of the Titan. But the EC reset is not the same thing that I'm talking about.
    Most folks seem to be missing the subject. There are a variety of things that can happen to a notebook computer that make it impossible to turn off or restart (in the Windows "restart" sense). The most common problem is a software problem. When a turned-on notebook "hangs" or "freezes", pressing and holding the power button for several seconds will force a shut-down. Afterward, you can start the computer again and it should boot up normally---unless there is a hardware problem.
    But this is not what I'm talking about.
    There are two battery systems in most notebooks. There is a small non-rechargeable battery on the motherboard that provides enough power to maintain the clock and system BIOS settings. And there is a large rechargeable battery to power the rest of the computer.
    When the BIOS is replaced with a newer version, the new BIOS will often be out-of-sync with the embedded controller (EC). The embedded controller affects lots of things like the cooling fans, some keyboard functions, WiFi, bluetooth, GPUs, etc. In some extreme cases, a notebook computer with a new BIOS may not turn on until the EC is reset. MSI recommends that the EC be reset any time the BIOS is replaced---it should be done immediately afterward.
    How do you reset the EC? Remove the notebook's main battery. Obviously, this won't work for the Titan and other notebooks that have non-removable batteries. In this case, some notebook manufacturers provide an "EC reset" switch for some models---but I don't know if these switches disconnect the main battery completely---they may only remove power to the EC circuit. If the reset does truly disconnect the main battery from all circuits, then it is sometimes labelled a "battery reset" switch (this is the name Toshiba uses).
    Evidently the Titan takes a different approach---according to chc, holding down the Titan's power button for about 12 seconds will reset the EC (I'm assuming this only works while the Titan is turned off---otherwise it would simply trigger a forced-shutdown as described above).
    But this is not what I'm talking about, either. (Besides, I tried holding down the power button for over a minute and the computer still would not start up.)
    The problem I'm talking about is a build-up of static electricity inside the computer. This is the same static electricity that shocks you when you touch your finger to another object after sliding your shoes across a carpeted floor. You see, notebook computers operate without a connection to electrical ground---so they can pick up a static charge more easily than "grounded" computing and electronic devices. The static charge may not be large enough to permanently harm the notebook but it may be large enough to interfere with its operation.
    When can this happen? During a thunderstorm or any time the notebook is located in an environment where a lot of static electricity is present. It also happens in space because there is no "ground". As I understand it, it is a periodic source of trouble aboard the international space station.
    To correct the problem, you usually need to do two things: (1) Remove the main power sources from the notebook. This includes unplugging the AC adapter and removing the main battery. (2) Press and hold the power button for 10-30 seconds to give the static electricity a path to the power control circuit where it can (hopefully) be safely discharged.
    The problem with the Titan and other MSI computers with non-removable batteries, is there is no convenient way to remove the main battery. Therefore, if static electricity builds up, there is no convenient way to discharge it.
    Now I can't be certain that the reason my Titan wouldn't turn on two weeks ago was due to static electricity. It was a weekend and my troubleshooting tools were limited. Perhaps the EC decided on its own to go crazy. Perhaps something in the power supply is intermittent and failed for the first time---and I'll have to wait for it to fail again before it can be identified. But the conditions for a static electrical problem were present. There had been a rainstorm that night after the Titan has been shut off. The Titan was connected via ethernet cable to an incoming cable modem and line from Comcast. And the symptoms pointed to a static electrical problem.
    Until I disconnected the battery's power cable from the Titan's motherboard, my Titan was dead as a doorknob. It gave absolutely no sign of life when trying to turn it on. It was as if the power switch no longer worked.
    So, to my mind, what the Titan needs (as well as all MSI notebooks with non-removeable batteries) is an independent reset switch that will allow the user to temporarily disconnect the main battery for as long as the user presses the switch. If an "EC reset" switch will do this, fine. But I don't think it will work if the power switch serves double-duty as an EC reset because the user needs to disconnect the battery at the same time he/she is holding down the power button to dissipate static electricity. I believe the Titan's power switch cannot do both at the same time because I tried it multiple times and it never helped my Titan.
    Perhaps there is some other method to dissipate a static electrical build-up. If there is and it is easier to implement---then I hope it is provided in future products like the Titan.
    Kind regards, David

  • How to power on reset switches not responsive. IOS in a  loop?

    How can I do power-on reset on iPad wiht swtiches not responding.  IOS is active evident from rolling display colors and vertical bars.  If on analogue display, no vertical hold.  Tried power switch off for several seconds can not stop roll.  Tried two switches together, also not effective.  No indications that environment has changes.  Is IOS looping, or is there a hardware glitch.
    Just completed recommended IOS update. 

    Did you hold the home and power buttons 10-15 seconds till the screen turns black and the Apple logo appears ? When the logo appears release both buttons and wait for your iPad to start on it's own.

  • HT4623 My app icon shown i have 11 items waiting for updating. But the update is blank. I try to reset, switch my ipad off and reboot it, sync my ipad the 11 items still remain. Can someone please advise me how to clean this up.?

    My ipad 2 app icon show I have 11 items need updating but there is nothing on the app update page. I tried all method to reset my ipad, sycnc my iTunes with ipad connected, reset my ipad but not successful. The 11 items still appear on my app icon. Can someone help me?

    The update server is down; try this temporary workaround
    App Store>Purchased>Select "All"
    Note: Look out for apps that have the word "Update"
    http://i1224.photobucket.com/albums/ee374/Diavonex/9c256282736869f322d4b3071bbb2 a82_zps51a6f546.jpg

  • Resetting Switches and Buttons

    Hello,
    I have a vi which uses three initial switches to select an input. The switches activate once pressed and then stay pressed even when the vi is stopped. Also, I have a stop button wired into local variables so I cannot set as a latch as I would want to. If I set the initial three switches as latches then it is difficult for the user to see that a button has been pressed.
    So the problem I have is that when I stop the vi with the stop button, this button stays pressed. I cannot set the stop button as a latch because it is not allowed in Labview with local variables. The next person who comes along will not see that the stop button is pressed and start the program only to find that the stop button is pressed and some sort of loop will happen.
    Is there a way of when starting the vi that teh select buttons and stop button will default to the initial positions.
    Nevica
    Message Edited by nevica on 08-17-2009 04:06 AM
    Message Edited by nevica on 08-17-2009 04:10 AM
    Attachments:
    BARA3.vi ‏699 KB

    Jorn, You shouldn't initialize the stop button AFTER the program ends since you have not accounted for the case when the VI stops abruptly. Always initialize your variables at the start of your application.
    nevica wrote:
    I have decided to stop the vi with the vi stop button on the top bar instead of creating my own stop button.
    DON'T DO THIS. Using the Abort Execution button when stopping a VI is like using a tree to stop your car. You need to stop the VI gracefully in the application itself.
    Have a look at the attached application for an example of how to initialize your boolean buttons at the start of the application. I have implemented it using a State Machine. Since I am in a hurry, I did not account for error checks.
    Adnan Zafar
    Certified LabVIEW Architect
    Coleman Technologies
    Attachments:
    Test.vi ‏11 KB

  • HD Activity LED, Reset Switch, Power Switch, Power LED - Which Way Around?

    I notice these connectors have little arrows on them but it's not much help 'cos I don't really know what they mean and there's nothing on my K8N Plat Sli to align them with. I don't know what all the pull up, pull down nonsense of the manual is referring to.
    I think the switches don't matter, but what about the others?

    See Sticky Find Answers Here Fast  --> Trouble Shooting -->  No Post/No Boot problems and fixes  --> 7) Front Panel Connectors: JFP1 & JFP2 Check & align pin 1.
    luck

  • My iPad just died...is there a reset switch?

    iPad is about a year and a half old.  Never had any problems.  I had been using it all night long and opened the cover.  NOTHING.  Black screen.  Tried the home and hold keys but still nothing.  I know the battery was about 80% charged.  I have tried leaving it on the charger for 8 hours but still nothing.  What is my next step?

    Trying that 20 times is futile as you have discovered
    Connect to your computer and restore from iTunes
    If that doesn't work take it to Apple and ask them to check it out for you
    Allan

  • My photostream is all over the place, how can I reset it?

    Hi All
    I consider myself to be fairly au fait with all that Apple/iCloud etc has to offer, and it has to be said I'm a bit of a fan boy too
    However all I want is for my camera roll, and photo stream to be synced on my iPad, iMac, iPhone 5 and Mac Book Pro. But can I get this to happen?
    No, is the unfortunate answer.
    I have iPhoto all set up to use Photostream, and I'm using the same id for iCloud on all devices, but all my photo streams are different on the different devices.
    Is there a master reset switch?
    Thanks in advance

    Hey apple-lovin-it,
    Here is an article that should be able to help you troubleshoot this issue with your Photo Stream:
    iCloud: Get help using My Photo Stream
    http://support.apple.com/kb/TS3989
    Thanks for coming to the Apple Support Communities!
    Cheers,
    Braden

  • Turning off my DAQPad 6016 causes my computer to reset

    When I turn off my DAQPad 6016 after a day of use it causes my computer to reset. I can only figure it is a driver issue however how can I prevent that as when I change the configuration of the 6016 I often turn it off just to be safe. Is there a patch file for this device? Does anyone else have this problem?
    Thanks, Dave

    Sean, thanks for your reply, sorry it took me forever to get back to you but with the holidays and all its been crazy.
    I am still experiencing the problem. In reply to your question I do have Ni-DAQ 7.3 installed.
    When the problem happens it is after I run my VI that calls the DAQ, but the VI has been stopped. When the computer decides to reset I dont get a warning or even a blue screen it just goes back to the POST screen where it identifies my system resources as if its being turned on for the first time. It seems that the DAQ power switch acts as a reset switch on the computer would.
    However I have been going back over my code and it seems I forgot to place a DAQ Stop on one diagram before I call the DAQ Clear Task so I am assuming it is not stopping first and that the clear will have no effect. I fixed my code and hopefully this will solve the problem. I will keep you posted as I will get back to using the device in the new year.
    Thanks for your help.
    Happy Holidays.
    -Dave

  • Need reset box with flip-flop green LED and reset button

    Before I build up a large number of these, is there an off-the-shelf box with flip-flop green LED and reset button?

    Hi,  I'm not sure what you mean.  Are you looking for a phsyical project box witha built in reset switch and LED?  Or are you talking about a LabVIEW template?
    Chris Bakker
    National Instruments
    Applications Engineer
    Check out LabVIEW 2009 and the New X-series DAQ!

  • Connecting a Leaf switch to a counter

    I am a newbie to LabVIEW so bear with me, please.
    I connected a switch ( a leaf switch similar to the Power and Reset switch on the front of a Dell OptiPlex GX-110 PC) to the source pin of a counter on my PCI-MIO 16E4 card.
    I am using the switch to count events.
    Whenever I click (press and release) the switch, it counts more than one, and counts unpredictably (10-100 counts instead of one).
    I dont want to use a 555 monostable to output a single pulse and feed that into the counter's source pin.
    Is there a way to make the counter ignore the bounces from the switch, so that I can use is in some real and useful applications?
    Any help is greatly appreciated. Otherwise I will have to abandon it and switch to my ABB AC31
    PLC and use the MOK function....

    Hi Tanveer,
    The NI-660x counter/timer cards have programmable debounce filters to prevent this type of behaviour.
    However, the E Series cards don't have this debounce filter. I assume that the behaviour of a leaf switch is to switch an output high while the button is pressed and switch an output low while the button is released. If this is correct, then we can use the E Series counters (PCI-MIO-16E-4) to emulate a debounce of sorts. If you set the counter application to be retriggerable pulse generation and set the pulse width to be generated greater than the typical duration of a push button but less than the period before the next push of the button, the we will have created a clean single pulse. You can then route the output of this counter to the
    input of the second counter's source and count that. I'm not sure if this will work as I'm not too sure how the leaf switch operates but hopefully it gives you some ideas.
    Ron

  • Have a blinking yellow light on airport express.  Reset... Still Blinking.  What do I do?

    Airport Express has blinking yellow light.  Reset.  Still blinking yellow.  All other apple products, Apple TV, Mac's connecting fine to Airport Extreme.
    Had to reset AE a few months ago and have not used this airport extreme since that. Suspect is a simple fix but not doing something right.  Anyone help?

    A persistent, flashing amber light indicates that any of the several potential conditions may require your attention:
    The base station has not yet been configured because it is new, or the reset switch has been set.
    You have selected a security configuration that is not recommended.
    One of several other conditions, such as a disconnected Ethernet cable or invalid IP address has been detected.
    (ref: http://docs.info.apple.com/article.html?artnum=305101)
    If you run the AirPort Utility, it will show an amber circle on the summary page next to the area(s) causing the problem. Click on this amber circle and it should provide an explanation.

  • Th button. This happened some months ago and I succeeded in starting it using a procedure I found on some forum, which involved pmu reset  etc. now I cannot find this advice. If anyone remembers how this is done I would be gr

    My t 1.25 refuses to startup on pressing the on button. This happened once before and I found a formula on a forum which involved the pmu reset switch in combination with other directions, which was successful in correcting the issue. Anyone remember how to do this? Many thanks

    Resetting PMU:
    http://support.apple.com/kb/HT1939?viewlocale=en_US&locale=en_US

  • Cisco WRV210 unable to reset

    I have a Cisco WRV210 wireless router that wont boot correctly after enabling WMM, problem is that after I enabled WMM and router rebooted I only see the power led and DMZ led on but not the wireless led and Internet led. I tried using the reset switch several times and nothing worked. Should I dispose of it and buy a new router or is this one still repairable?

    Alvaro,
    Please call support since the router is still under warranty.
    www.cisco.com/go/sbsc
    - Marty

  • How to reset the [b]Spy-Servlet[/b] aggregates

    Hi,
    with the Spy-Servlet (/dms0/servlet/Spy) we can view performance metrics.
    The data used for the metrics is from the start of the oc4j until I call the Spy-Servlet.
    It would be nice to have the possibility to reset the collected data to get a view of what's the performance at the moment and not since the server was started (maybe a very long time).
    Is this possible?
    I'm using oc4j 9.0.3 standalone version.
    Thanks for your help
    Günther

    Hi,
    with the Spy-Servlet (/dms0/servlet/Spy) we can view
    performance metrics.
    The data used for the metrics is from the start of
    the oc4j until I call the Spy-Servlet.
    It would be nice to have the possibility to reset the
    collected data to get a view of what's the
    performance at the moment and not since the server
    was started (maybe a very long time).
    Is this possible?
    I'm using oc4j 9.0.3 standalone version.
    Thanks for your help
    GüntherI don't think there is any form of reset switch, but I'll send it to the DMS dev team and see if they have a way to do it.
    One possible way to accomplish this is to do a restart (ie using the admin.jar -restart operation) of the container -- which of course is only possible if it's not servicing a client.
    cheers
    -steve-

Maybe you are looking for

  • Open DNS Numbers Question

    I have a 2Wire Router/Modem from AT&T do i have to add the numbers to this or can i just add them to my computer via System Preferences?

  • ITunes won't open after downloading 7.0

    My iTunes won't open after downloading 7.0, what should I do?

  • Can I use same LR 5.4 catalog across Mac and Windows PCs?

    Newb question here. I'm just learning LR, and have installed LR 5.4 on both my Mac and on my Thinkpad (running Win 8.1). Can I create a single LR catalog on a detachable drive, and then use it to edit  my LR work (i.e., moving it between machines) on

  • HELP ME PLEASE!!!! My mac clock will not open up to edit the time?!?

    Ok i recently had my computer fail on me so i got the graphic hardrive on the computer replaced. BUT now.. i have faced a really bad problem the clock on the upper right hand side will not change it says it is march 2nd 2001.... Im really frustrated

  • Double click on icon to run java application

    Hello, I want to write a code in java so that if i double click on icon the program will start showing the window as it appears when we double click acrobat and the we get the main screen. How this can be achieved? Thank you