I am still trying to get two funtions to run AT THE SAME TIME within my vi, but to no avail.

I am trying to capture a signal with a daq card (PCI-MIO-16E-4) WHILE I have a picture box switch back and forth between grey levels. It is absolutely necessary that they both happen simultaneously, but what is happening is that the picture box stops switching while the DAQ is capturing the signal. Can someone take a look at this and offer some suggestions, or just see if you can get this thing to work. The vi is simple and should be straight forward, right? I have had some suggestions on a previous fishing expedition, but none worked. If you try this vi, set the scan rate to 5000, and the # of scans to 15,000. P.S. I am running labview 6.1 if that makes any differenc
e. Thanks for your attention.
Attachments:
Acq_N_Scans_to_File_(wdt)_with_flicker_2while.vi ‏135 KB

Hi Planar,
You have been trying hard!
I am not sure the following will help, but I would like you to try it out.
I have restructured your code to help reduce the work that is done while data is acquired.
1) I "pre-compute" the pictures at app start-up. This way only the pictures need updated and the pictures are rendered repeatedly.
2) I moved your config up front so it does not run while the flickering is going on.
3) I add a check of the backlog from the DAQ that looks at the number of scans waiting in the buffer WITHOUT reading the data. Only when the requested # of scan are ready is the data read.
4) While waiting for the buffer to fill, the daq loop will execute a wait, thereby freeing CPU for the flicker tasks.
Your code, w
ith my changes is attached (in LV 7.0).
A jpg is included for non-LV-7.0 readers.
Yes, the code is sloppy! I am woring fast and for free!
No, I do not have DAQ hardware to test so it may NOT work right out of the box.
I hope this helps,
Ben
Ben Rayner
I am currently active on.. MainStream Preppers
Rayner's Ridge is under construction
Attachments:
Flicker.vi ‏152 KB
Flicker.JPG ‏157 KB

Similar Messages

  • Two seperate animations running at the same time

    Hi
    I would like to make a fully automated presentation, with some object moving and the like... I am trying to have two seperate animations running on the same slide. The animations are quite simple - move in, move around, move out. What I would like is that they both act seperately so they start at the same time, but otherwise begins to move at different times and exits at different times. I'm having trouble achieving this as i can only link automatic actions to the last action on the list (i.e. I can't have two trees of actions that start simultaneous)
    I hope I have succedes in complicating an otherwise straightforward question with my late-at-night english

    You'll have to be more imaginative with the way you structure the builds so you can in fact do it inside one tree. (Not a put down, just it's hard to give more exact answer because the question has few specifics).
    Remember you have +*delay options*+ for each build, so two concurrent build/move actions can actually occur at different times in the presentation. Play with the start build and delay controls and you should be apples.

  • Having two background brarchive running at the same time with -f 1 options

    Good morning,
    I need to run two brarchive in parallel as background  process.
    I would like to have on for the save and one for the copy.
    I need that because they would have different files.
    1. Is this configuration supported or not?
    As a file is created for the locking (.lock.bra) I have the feeling that a single process is supported?
    2. Just to double check, can I run two brarchive with two different config file in a serial manner
    (lauch the 1st one, wait for its end, launch the 2nd one, waits for its end).
    3. If you are using that kind script on your systems, could you please provide them?
    4. If brarchive is launched by a script how do you shut it?
    Do you do just a kill of the script or do you kill it and send another signal to the brarchive if it is currently running?
    Thanks in advance for your answers.

    Good afternoon Eric,
    > Why do you want to use option -f 1? what are the reasons being this?
    -f makes it run in background.
    For me, there two advantages for doing that.
    1. You start it once, when you start sap, and it runs regularly
    2. When you stop sap, you stop braarchive.  Then you are sure that no crontab jobs are going to be started when you have stopped SAP.
    > you want to stop  brarchive with option -f running? try:
    >
    > brarchive -f stop
    This is what is currently done right now.
    It works well.
    I can use it because we do a single copy of the archive log up to now.
    We are going to run two brarchives (one to save to a tape robot with backint and one that scp).
    I would like this to run as daemon.
    Now, that you have answered that I can not have two brarchives running at the same time (thanks for your answer),
    I need to write my own daemon in sh or perl that would do:
    1. Run brarchive first run (with -p backint init<SID>.sap file)
    2. Wait for the en of the brarchive process and log
    3. Run brarchive second run (with -p scp/stage init<SID>.sap file)
    4. Wait for the end of the brarchive process and log
    5. Sleep during a few minutes
    6. Handle stop signal so that it ends the forked brarchive that may be running.
    I am sure that people on this forum have already wrote such scripts.
    I may open another thread as it divert a little from my original question.
    Thanks in advance for your help.

  • How can I get two cameras to aquire at the same time rather than one after the other

    I've got (2) PCI-1428 cards, Two Uniq Vision cameras with power supplies, cameralink cables, and IMAQ-D6804 cables. Both cameras are being triggered by the same switch, but they are not grabbing images at the same time. Right now it is triggering one camera as desired, but the other doesn't aquire until after the time-sensitive event. On the next test, the two camera will trade these roles. I am using 2 cards, so they should acquire at the same time. How do I change it so that they grab images at the same time? Thank you for your help.
                                                      ​            Deater

    Hi Deater,
    Thank  you for your post.  Triggering from two cameras at the same time may be a little trickey, but it can be done.  There are multiple ways to tackle this problem.  If you have a RTSI cable, you can RTSI the two PCI boards together internally to lock them in HW.  You should also be able to use the triggering line on each board.
    One of the best methods for triggering multiple boards is called GenLocking.  The following Developer Zone page describes GenLocking more fully and has several examples to help you out: http://zone.ni.com/devzone/conceptd.nsf/webmain/a3​87b5c0ac6f6f4e86256c87005fcddf.
    The "HL Grab with two boards.vi" shipping example is also a good example of the code needed to trigger two individual boards in LV.  I found a similar post that may be of some help as well: http://forums.ni.com/ni/board/message?board.id=230​&message.id=2691&requireLogin=False
    Hope this helps!
    Thanks,
    Scott Savage
    National Instruments
    Applications Engineering
    www.ni.com/support

  • Can't get my threads to run at the same time  :-(

    Hi,
    I hope someone can help me. I have an two instances of an object that extends thread. In it's run method, there is a while loop that iterates while an int x (that starts at about 450) is not less than 0.
    In the while loop there is an x--; statement.
    Also inside the while loop is a call to yield();
    Also is a call sleep(5);
    Also in the while loop is a statement something like "System.out.println(x);"
    The int controls the vertical position of an icon (a JLabel) on the screen.
    In the class that has the main method, two instances of the thread object are created one after the other and run one after the other, although the program keeps running the first one until it has finished before running the second one!
    For example, the code looks something like this:-
    o1.run();
    System.out.println("o1 running");
    o2.run();
    System.out.println("o2 running");
    And the end printout (with the println call from the thread objects) looks like this:-
    o1 running
    450
    449
    448
    3
    2
    1
    o2 running
    450
    449
    etc.
    What's going on? Why won't it start running the second thread straight after the first one?
    Any help appreciated!

    class test extends Thread {
      private int i = 0;
      private String strMess = new String("");
      public static void main (String[] args)  {
         test t = new test("first");
         t = new test("second");
      test(String strIn){
           this.strMess = strIn;
           this.start();
      public void run(){
           while(i<5){
              System.out.println(this.strMess + i);
              try{this.sleep(200);}catch(Exception e){e.printStackTrace();}
              i++;
    }output:
    first0
    second0
    first1
    second1
    first2
    second2
    first3
    second3
    first4
    second4
    class test extends Thread {
      private int i = 0;
      private String strMess = new String("");
      public static void main (String[] args)  {
         test t = new test("first");
         t = new test("second");
      test(String strIn){
           this.strMess = strIn;
           this.run();
      public void run(){
           while(i<5){
              System.out.println(this.strMess + i);
              try{this.sleep(200);}catch(Exception e){e.printStackTrace();}
              i++;
    }output:
    first0
    first1
    first2
    first3
    first4
    second0
    second1
    second2
    second3
    second4

  • Getting two computers to run on the same internet line but to far to use wireless router.

    i have my main computer in the house using westell 6100 and linksys wireless, but it will not reach, (distance wise) to the garage, where I have a phone line and want to use my laptop.  Can i hook up another router to that phone line?

    In order to avoid board clutter, we ask that you post your topic on one board only.
    Please look ---> HERE for replies to your topic. Thank you.
    If a forum member gives an answer you like, give them the Kudos they deserve. If a member gives you the answer to your question, mark the answer that solved your issue as the accepted solution.

  • When our iPad is in use on the internet, my iMac internet connection goes off. I can't get the two devices to work at the same time with the AirPort Express. Is there a setting somewhere I may have missed?

    When our iPad is in use on the internet, my iMac internet connection goes off. I can't get the two devices to work at the same time with the AirPort Express. Is there a setting somewhere I may have missed?

    When two or more devices conflict it typically means that the DHCP service is either misconfigured or is not running at all. DHCP provides IP addresses to local network clients.
    Is your AirPort Express base station the only router in your current network configuration? That is, is it connected directly to an Internet modem and not to another router upstream of it?

  • Two Telnet read VI's running at the same time interfere with each other

    I have a situation where multiple tests must test multiple UUT’s on the same computer. To send commands to and get responses from the UUT's I use a telnet session. The telnet read VI uses a semaphore. Therefore when two separate top level VI's are running, each calling the Telnet read VI, if one Top Level VI is using the Telnet Read VI the other Top Level VI waits for the first one to complete before it can use the Telnet Read VI. This VI is setup for reentrant execution but because of the semaphore it cannot truly be used as a reentrant function. This causes severe problems when trying to communicate with two different telnet sessions simultaneously.
    In the past I have avoided this problem by compiling everything into an executable. Then each Top Level program runs completely independently with no interdependences. However, now I am implementing Teststand and I need to call the same Top Level VI's. I need to be able to get information into them and back out of them from Teststand. This means that I can no longer compile them into stand alone executables. I did compile each top level VI into its own Share DLL thinking that then each top level program would have its own library to call upon. This did not work. Even though both top level programs are compiled into their own DLL there is still interdependency when calling the telnet read VI. One program waits for the other to finish reading from its telnet connection before it can read from its own telnet connection. Since I have to continuously read from the telnet connection, sometimes for up to half and hour, the tests do not function simultaneously. How can I get around this? Is there a solution?
    Josh
    PS The Telnet Read VI I am refering to came with the Internet Toolset package. Attached is a copy of the VI I use to communicat with the UUT's.
    Attachments:
    GUI_Telnet_W-R_Auto.vi ‏64 KB

    Sorry about the confusion.
    The file I attached is in the hierarchy of two separate top-level VI's. The telnet connect is opened once and closed once in each top-level program. The ref number is then passed into and out of the VI that I attached. I use this VI to repeatedly send commands via telnet and wait for the appropriate responses. The telnet read VI is given a read line separator and reads from the telnet connection until it matches the read line separator with a text string read back from the telnet connection. If not match is found it times out and creates an error.
    I am not sure how to provide an example of the overall scheme since the problem occurs when both top level VI's are compiled each into their own shared DLLs. Those DLLs are then call from Teststand and at some points they are both running at the same time on the same computer connected to two different UUT's.
    The question I have is why does one DLL share functions with the other? When one DLL is using the telnet read VI the other DLL waits for the first one to finish with it before it can it use the telnet read VI. If they were both compiled separately each into their own DLL shouldn't they each have their own set of functions to call upon instead of having to share? I know that if the two top-level VI's are not compiled they cannot both execute the same sub-VI at the same time. The only way to get around this is to set the execution property on the sub-VI to reentrant.
    I actually fixed the problem by setting the VI I attached and the Telnet Buffered Read.VI (called by Telnet Read.vi) execution properties to reentrant. However, I am still concerned about two separate DLLs sharing sub-VIs. Why does it do this?
    Joshua

  • Can I connect my Mac to two separate wireless networks at the same time?

    Need some assistance with some advanced wireless networking please....
    Upstairs I have a D-link wireless router connected to the internet and wired to a couple of PCs. Downstairs I have a minimac linked to my hifi via an airport express. I have bought a D-Link DWL-G122 usb wifi dongle.
    So I want the mini mac to connect to the airport express on one wireless network (strong signal) and to be able to connect to the internet on another network (weak signal) via the usb wifi /router.
    But the airport software and the d-link driver seem to conflict and both try to take control of the two wireless devices.
    Is there any way round this to be able to run one mac with two wireless network devices at the same time?
    Thanks

    While those with more experience may be able to correct me, I'm pretty sure that you can only connect to one wireless network at a time with your Mac Mini, unless D-Link provides their own proprietary software that bypasses the computer's Airport settings.
    Using the AirPort hardware you can only connect to a single wireless network at any given time. However in this situation the 2 attempted connections are via USB and AirPort. Therefore this requires nothing special of the AirPort drivers or settings.
    It does require that the Mac OS and applications have the capability to use either network connection (USB or AirPort) depending on what data they are trying to get. In general I understand how it is theoretically possible but I have no idea if you can configure OS X to do it.
    ...I believe one of the options when setting up the Airport Extreme Base Station is that you can extend a wireless network already in place.
    True but the D-Link is not compatible with Apple's WDS therefore this is not possible in this situation.
    If you have a newer Airport Extreme Base Station with a USB port on it...
    FYI, every AirPort Extreme base station (AEBS) has a USB port.
    BTW, birky has indicated that he/she is using an AirPort Express (AX) not an AEBS.

  • FRM: 10270 Cannot attach the library when two forms run at the same time

    I get the error message FRM: 10270 Cannot attach the library SYSLIB while opening menu BMENU but only when i try to open a second form while the first form is still running.
    Both forms are working fine as long as they ar not running at the same time.
    It seems like the second form opening does not have access to the FORMS60_PATH, because you can not open a third form because it can't find it.
    All the forms anf libraries (plx)is in the FORMS60_PATH.
    I am running developer_6i forms & reports on a HPUX 11i machine and I am trying to access them through jinitiator 1.3.1.9 on a XP machine.
    Best regards
    Macke

    Thanks a lot for the tip. I used truss and realised that it found the library but was not allowed to open it. The kernel parameter maxfiles was set to low.
    I increased it and everything works ok
    BR
    Marcus

  • Two processes running at the same time in Lookout

    I have installed Lookout 5.0 with 200 I/O Points onto our server computer. The application of motion control is next to the 200 I/O points through OPC PMAC server/client. Now I would like to have a second process in the same server for trouble shooting and testing without stopping the motion control process. However, this second testing process could have also many I/O points through Serial and USB ports. I assume that the total amount of I/O points of both processes will be greater than 200.I prefer to have independent processes for control and testing because access levels. Can I have these two processes running at the same time when needed?

    Hi,
    From your description you are using a third party OPC server for the motion application. You could have a second Lookout process communicating with the same OPC server with no problems, as long as you do not exceed the number of I/O points your license supports.
    Also, the process you are using for testing obviously could not overwrite datamembers (or registers if you will) that would interfere in the overall application, in other words you can test your application as long as you keep the coherency of the test.
    So the answer would be, yes it is possible, however you are still limited to the number of I/O's your license supports... You may even consider upgrade the number of I/O's you have in your license.
    Best Regards
    Andre Oliveira

  • Is there a way to work with two or more app at the same time on iPhone or iPad

    Is there a way to work with two or more app at the same time on iPhone or iPad?

    What i am attempting to achieve is to work with at least two app at the same time. For example: select any picture from my albums to attach them in an email. Another example is get data from an app to use it with the calc app. And there are more exaples for it. And for sure I need support for an iPad air. I mencioned the other tablet just to try to be a bit clearer.

  • Having two oracle clients installed at the same time

    Hi, I was wondering if there is a way to have two oracle clients installed at the same time on one computer, and if there is a way to be changing the default client between the two. I need to have installed the oracle client 10g and 8 versions on the same computer, because we have a problem with a legacy application that for some reason only works with version 8, and we need the 10g because our new applications requires 8.1 or later. We are still migrating to the new system but we developers need to have the two clients. Any help is appreciated. Thanks in advance.

    Is it possible, sure.
    Technically, clients before 8.1.5 were not multi-home compliant, so having Oracle 8 and Oracle 10g clients on the same machine is almost certainly not supported. On the other hand, I know that a number of developers at Oracle had combinations of Oracle 7 clients Oracle 8 clients, Oracle 8i clients, and Oracle 9i clients on their development machines at the same, so you shouldn't have too many major issues.
    Most "default client" issues come down to which ORACLE_HOME is first in the system's PATH. Ideally, you would leave the Oracle 8 ORACLE_HOME first in the path and explicitly reference the 10g ORACLE_HOME when configuring anything that relies on the 10g client.
    Justin

  • Can two subVI show up at the same time?

    Can two subVI show up at the same time?

    Hi,
    Save the vi as a template (*.vit), then you can open it (dynamically) as
    often as you want. If you make the vi "floating", you get the best results.
    Regards,
    Wiebe.
    "smal" wrote in message
    news:[email protected]..
    > Hi,
    > What if the subvi has to be called dynamically (hence using call by
    > refrence node).
    > In fact I want to run a subvi each time a button is clicked
    > independent of the others(it gets just some parameters from the caller
    > vi & must continue running so the user can interact with it via its
    > front panel )
    >
    > Thanks for your attention in advance.

  • Getting 'Paint' and 'Sales History' to run at the same time

    Hi,
    Is this a matter of setting up a port for Paint and another for SH? Is there a limit to the number of OBI repositories that can be running at the same time?
    Thanks!

    Thanks.
    Can two or more repositories exist in the same rpd file? Can Paint and SH be in the same rpd file and be used by seperate groups that access completely different data sources?
    In our case, the dimensions and facts for glass used in a car are very different from the dimensions and facts for a car's transmission. There are similarities, true, but they are still very different.
    So, in one rdp file can there be seperate presentation folders for Glass, Tires, Transmissions, Seats, Axil, Engine, Steering Wheels, Head Lights, and etc...
    Each presentation folder would be used by different people. Each presentation folder would access different tables. The Glass Parts business will use the Glass presentation folder, the Axil Parts Guys will only use the Axil Presentation Folder, etc..
    As always, thanks!

Maybe you are looking for

  • MacBook and Airport

    I love my black MacBook so much. There is one thing that it does, that bugs me though. If I close the lid and put it to sleep, then open it, it takes a very long time for it to reconnect to the Airport Base Station. What's up with that? My iBook and

  • How know 1 of 18 process in lookout is run or not?

    How know 1 of 18 process in lookout is run or not? I've use monitor object, but some times work some times not. I try with absolute adress, relatif adress, computer adress... tanks for your help

  • Release Strategy @ Company Code Level

    Hi Guys: We have a two plants under one compant code, when we issue PO to the vendor it consists quantities that are required for both plants ( Central purchasing org). Release strategy for PO is at header level , I.e Total PO Value can we release st

  • BR*Tools 7.0 and 7.1 what Instance Client version 10202 or 10204

    I'm not sure if this is the wright form, but here goes.  I have a question.  What Instance Client verion (10.2.0.2 or 10.2.0.4) do you install with BRTools 7.0 and BRTools 7.1.  Can you use either Instance Client version with either versions of BR*To

  • J2EE Connection pooling

    Does anybody know how to configure Kodo to use the datasources previously created in JBoss? I'd like to delegate the connection pooling management to the appserver instead of Kodo's PersistenceManager. Thanks Arthur