Board basics

I thought I'd make a simple button toggle, but it turns out that I'm missing some basics...

Here's the code in a click action applied to a button on the main stage

isPlaying var = false;

if(isPlaying == false) {}

sym.getSymbol("windTurbine1").play ();

isPlaying = true;

} else {}

sym.getSymbol("windTurbine1").stop ();

isPlaying = false;

}

He plays the symbol but does not switch.  I tried to use a Boolean primitive and a boolean object - that it the scope of the code above?  Is the isPlaying a global variable defined in step and can I just address him by name?

References or insight is appreciated.

I think that is what is happening - since your code is on a click action, it runs every time that occurs a click, so 'isPlaying' is set to false, each click.

Rather than put your code on the button, put your code on Stage.compositionReady, then call the function of your button. Keep all the code running in one place, it's also a better way to organize your files.

code on Stage.compositionReady

sym.isPlaying = false;

sym.onClick = function() {}

if(sym.isPlaying == false) {}

sym.getSymbol("windTurbine1").play ();

sym.isPlaying = true;

} else {}

sym.getSymbol("windTurbine1").stop ();

sym.isPlaying = false;

}

}

code in the click event of your button

sym.getComposition () .getStage () .onClick ();

Tags: Edge Animate

Similar Questions

  • Visualization from scratch tree [basic support = Board to design]

    Hello guys

    First of all, please visit this link

    http://Kindo.com/en/famous-people/Barack-Obama-family-tree/Barack-Obama.html

    I really want to do something like that, I know it's a pretty huge app, so I'll be working on it, slowly and steadily.

    On the start menu, I will focus just on the sides of control like zoom/pan/etc

    so I'll start working on the visualization of real tree (hard work), and I'm sure that with the help of you guys, it won't be a problem.

    So my first Question is:

    What should I use as a Council to draw all the stuff on this subject.

    What should be the best, in this regard, later I might add zoom/pan/drag n drop on it.

    Use mx:Canvas or something else?

    Thanks in advance

    Use the canvas if you want to explicitly position child components.  Use a layout container if you want a dynamic repositioning.

    Tracy

  • Re: Toshiba Stor.E Basics 1.5 TB, USB 3.0 - about connection internal

    Please how can I know if inside the drive is sata native or with USB soldering on the circuit board?

    My model is: HDTB115EK3BA

    Thank you.

    Hello

    Unfortunately, the Toshiba STOR. E BASICS - BLACK 2.5 specifications page "-1.5 to provides no details on the controller, but in my view the inside of the box, you will find a common SATA 2.5 which is connected to a controller HDD USB SATA."
    http://www.Toshiba.EU/hard-drives/portable/store-basics/hdtb115ek3ba/

    You can also try some freeware like HDDscan for example tools to scan the HARD drive and get more details.

  • Basic concept of loop PID closed

    Hello

    I have a problem of very basic concept of PID loop closed. I read a lot of material of the PID controller but still confused.

    I understand that the error between the measure and the desired will be processed by PID controller, but I do not understand how the controller output (sum of three P/I/D) set the right plant behand the controller. For example, an electric motor fan will be below on a Board, the force of the wind on the motherboard could be detected by the tension and of course the fan speed could be adjusted by tension. But the error of the setpoint and the process variable will go directly to the fan in Labview without identifying the mechanisms on the plant (fan). I wonder if anyone knows how this error is treated by the plant. And why we need not care about the transfer of the factory function.

    If you have a transfer function for your plants, you don't need PID, because the output of the optimal control can be determined directly from the transfer function! (Well, more specifically, often in this case you would use the transfer to feed-forward control function, which you would combine with PID to correct minor variations between the reality and transfer function model.)

    The output of PID is not a sum of errors. It is a sum of the outputs of regulation - the proportional output, the full output and the derived products output. The gains set the regulator to the specific system, and if they are not chosen correctly, the control will be terrible and potentially unstable.

    In your hypothetical example of two systems - Yes, it is quite possible that one moment the error and so the output will be the same. But if the systems are very different, the next iteration of control errors will be different, so the next controller output value will be different, etc. And if the systems are very different, they should not have the same gains.

  • USB-6501 - impossible to find a basic example of Labview

    Hello

    I recently bought a USB-6501 card and I used it in my own succesfully end and C++ programs using the DAQmx drivers.

    Then I tried to move to Labview 2009 (I never used Labview) so I looked for a simple example.

    I tried to boot from the example 'interactive Control Panel' (http://digital.ni.com/public.nsf/allkb/AF0F31EE5D2AD23F862573140009D7C2?OpenDocument).

    I had to install the 'DAQmx Base' for him to start, as described in the previous link. now it begins (before Labview attempted to get a few missing .vi) but I get a message "error 200220 occurred at an unidentified locatio.

    Then I realized this example is 'old' (as explained here: http://forums.ni.com/ni/board/message?board.id=170&thread.id=209247), and it is suggested to look for a new one in example Finder ' entry-level equipment / output-> DAQmx-> Digital measurement (or generation)-> read Dig Port.VI.

    I tried, but along the way ' entry-level equipment / output-> DAQmx-> "only a folder named"Analog Measurement\Voltage"exists.

    Also in the search for 'Reading dig Port.VI' does not work.

    I've already spent many hours in this research and tent and the fact that I am not able to find not even a basic example, it is quite frustrating and it is making me give up the idea of using Labview.

    Please can anyone give me any suggestions where find/download an example simple and minimum to use my USB6501 in Labview 2009?

    Thank you

    Scipione.

    First, install DAQmx Base was a mistake. Uninstall it and then install the Driver-OR-DAQmx. The driver must be installed after the installation of LabVIEW. After installation, make sure that the device is listed in MAX under "DAQmx devices. If it is not, your installation is still not correct.

    To search for example LabVIEW, see help > find examples. Under Input and Output hardware > DAQmx, you will find the digital generation and numerical measures. You have to look at the simple, timed software examples such as read write dig Chan, writing Port to dig, dig chan, reading Dig Port. You also have the option to use the DAQ Assistant.

  • Basic questions Profibus

    I have a few basic questions about Profibus. We seek to develop a system that uses this form of communication, but we need a few questions answered in a broad sense, until we can move forward.

    How fast can it reliable to deal with a large amount of data while contained in an executable multithreaded great? Our typical executables are 7 500 KB and must run on a Pentium 4 PC indefinitely without triggering more than 20% CPU. Given this constriant and my general lack of familiarity with the technology / Protocol, how fast can go us? 100ms? 5ms? 1ms?

    Do I need any special software packages? Can I expect
    the developer of the Profibus card to provide the essential in software
    LabVIEW?

    We use LabVIEW 8.2.1; is it reasonable to expect a profibus card manufacturer to get the code for this version of the software, or is it possible that we have to upgrade?

    Hi BobChuck,

    PROFIBUS boards run the Protocol on board, with resulting very low CPU usage. If you buy a Profibus from a seller at random, you should be able to access the Profibus OPC server which should benefit from this provider. In such a scenario, you can expect the flow of data between 10 ms and ms 200 for all data (depending on the amount of data, the baud rate, implementation of the OPC Server and so on).

    With a card Profibus of NOR comes a set of screws that will interface directly to the Board of Directors, leading at the speed of communication much more high. This can be as low as 1 ms for all data, but there still depends on several factors. Still, you should expect a 10 x performance gain using the LabVIEW interface directly from the OPC. In addition these boards can also be used with LabVIEW RealTime.

    For more information, please refer to this tutorial.

    Kind regards

    Jochen Klier

    National Instruments

  • Porting to ARM LM3S811, basic PWM i/o issues

    Hi all

    OK, so quickly, I take back what I did:

    -The LM3S811: http://www.luminarymicro.com/products/ekk-lm3s811_evaluation_kit.html

    -J' used the generic LM3Sxxxx to create one for
    the LM3S811 by following the instructions in the porting guide for other ARMS controllers to help
    LabVIEW for ARM module, the simple guide.

    -J' got compile a test application and run it
    successfully on my new goal.

    -J' then I used Basic IO Wizard to create the
    necessary files again from the LM3S8962 in LM3Sxxxx generic folder.
    The two boards share almost all the same IOs, I only changed the PWM 0 and 1 to
    use the port D instead of B, PWM 2 to 5 share the same ports, so I t has not changed
    them.

    -J' tested some of the AIOs the GPIO, and I even had the
    Light OLED display driver to work.

    Now, if I use 2 PWM to 5 they work fine, but if I use 0
    or 1, my application freezes as soon as the Basic node IO is called
    my program when running on the target.

    Am I missing something?

    THX

    Lukasz

    OK, found the solution:

    Edition line34 of 'LM3S_Pins.c' to: '#define PART_LM3S811 '.

    and 'ARM_Serial.c' line 24 to: '#define PART_LM3S811 '.

    thx for the tip

  • Basic i/o on LM3S8962 stops execution

    I'm using LabVIEW 2009, boarded the LM3S8962 evaluation board for ARM and ran into problems with inputs and outputs basic predefined for the buttons - without basic IO, everything works fine, but with a button, the execution stops immediately with no error message. A similar code worked perfectly on the original version of Embedded for ARM 1.0 & LabVIEW 8.5. Is no longer, I can test with this version since the period demo has expired. I tested on 2 completely separate hardware games and Embedded for the 2009 ARM installations, with the same issues in both. I have attached 2 samples of simple work & work no screws

    Stuart

    Read the button once more - the port is also configured in the EIO node, so first reading detects the port misconfigured.
    Note that the port configuration involves enabling a pull-up resistance and it takes a while until that entry passes to set up new State (it is not software, an RC time constant has the main role here).

    Hope you don't mind for the "enhanced functionality.

  • list of sbRIO Eval Board of e/s

    I work with the sbRIO eval kit (http://sine.ni.com/nips/cds/view/p/lang/en/nid/211116) and I can't seem to find details on the output pin. The eval Board comes with a daughter card to interface the easy I/O, but I can't find any details on what DIO are connected to what buttons push-button and LED and what DIO control the LCD etc... Basically to research to find a spindle of the sbRIO mapping to the daughter card.

    Thank you

    Hello Merc_Bert,

    If please look at this picture of DIO Port mappings and let me know if you have other questions.

    Thank you!

    Deborah_Y

  • Device control series with i/o board?

    I have serial (RS232), I want to control a device with Labview.  It works fine when connected directly to the serial port of a computer, but I want to control it on a computer that does not have a serial port.  This second computer has a CB-68LPR i/o board connected to it well.  I wonder if I can hard wire some pins of standard for the jury of LabVIEW.  If this is possible, what pins would need to wire, beyond basic transmission lines?

    The CB-68LPR is not a DAQ card - it's just a dumb block of endings.

    Even if you have a real DAQ card that is connected to the terminal block, it would be extremely difficult to try to imitate the precise moment you need. It could not be done without time e/s digital material. This question was asked repeatedly. The cost of a USB-RS232 is so little that it is simply not worth the time to try again

  • What do DAQmxSetAIUsbXferReqSize(), DAQmxSetAOUsbXferReqSize() and DAQmxSetDOUsbXferReqSize() on the boards of the series M UBS?

    I have a multithreaded C ++ Builder program that acquires data analog with a wire and output of analog and digital data with a second thread.  The inputs and outputs occurs in blocks of data every 0.1 seconds.

    On the advice of M - and X-Series PCI and PCIe this output is smooth, but on a Board of USB-6259, admission is VERY NERVOUS waiting on every 0.3 seconds or more. This makes the use of USB M-Series cards with my program basically unacceptable.

    In an attempt to reduce nervousness and smooth the input/output of data, I tried to use the DAQmx features

    DAQmxSetAIUsbXferReqSize(),
    DAQmxSetAOUsbXferReqSize(), and

    DAQmxSetDOUsbXferReqSize()

    for my USB-6259.  However, the pieces of data and therefore smooth data inputs/outputs, these functions in different values to SUPPOSIDLY decrease of entry and exit to 0.1 second is no. DIFFERENCE OBSERVABLE versus normal code without them.

    My question is: these functions only designed to do something on the new X - Series USB series cards, but not the boards of the series M USB?  And is there a detailed documentation on these functions beyond C DAQmx help?

    Thank you.

    Bill Anderson

    Hi Bill

    I started looking into questions about the USB-6259 and functions of the required size. Since your post I understand you have two tasks at the same time, one is a task of entry and the other is data ouputting. If you could send me more details of your request, so I can look into this again, would be great. You can specify how tasks are put in place, so if you use synchronization, buffering etc so I can look into the issue for you.

    With regard to the questions you have asked.

    (1) these functions are not limited to the X series, so they should work as you would expect, and I was not able to find other problems with these features on our system.

    (2) unfortunately aid DAQmx is the extent of documentation on these functions, even when there is nothing on our system to go further in the functions.

    When you run your program if other programs and applications are open, it can cause treatment slow down, so that bare in mind also. If you run the task, how would this affect the use of the CPU?

    I found a few documents concerning your application which can help you to grow and to develop your code.

    What makes a High Performance Bus?

    and

    Streaming of signals of NEITHER: support the flow of data at high speed on external PC buses

    in this document, the external challenges of the bus for the Data Acquisition section has some good information on what is feasible with USB devices.

    If you have any questions or any other questions or would like some additional information, thanks for posting on this forum and I'll get back to you.

    Thank you

  • Basic IO with ADSP-BF527

    Hello

    I use the LabVIEW Embedded module for blackfin processors, and I want to use the basic i/o for this target. The problem is that this goal supports not the basic IO. So, how can I use the pins of this goal (PWM, analog and digital pins).

    Thank you.

    Hey,.

    Yes unfortunately your device does not support basic I/O according to How do I access all the basic IO on my black fins microprocessor. Here are two other ways to "communicate" with your device: Discussion Board to black using node C Inline fins and Using LabVIEW for Module of Blackfin. These are two ways that you can get and send data on your device. There is also this page which is specific to your device screws.

    Kind regards

    David

  • Bootmgr missing of error for windows 7 Home Basic

    Salvation;

    I want to restore my laptop to factory setting, because all network drivers are currupted and couldn't fix the laoptop. but I tried to restore to factory setting I'm missing bootmgr error fascing... .i have no any CD bootable...

    Here are the details of my laptop:

    Operating system: Windows 7 Home Basic

    Model laptop: HP pavilion dv6 notebook PC

    The system board ID: 1658

    Processor type: Intel Core i5 - 2430M CPU @2. 40 GHZ

    any help will be appreciated

    concerning

    khalid Khan

    When you request support, please provide the number full name or product model of the HP computer in question. HP/Compaq made thousands of computer models. Without this information, it can be difficult, even impossible to help you solve your problem.

    The information requested above are at the bottom of your computer or inside the battery compartment. , Please do not include your serial number. Please enter the product/model information in the HP Online Support page for consumers , and/or post it here for our review.

    Please indicate if the system recovery ran and finished or you were unable still to start the recovery. Depending on the exact cause, you may be able to fix the "bootmgr missing" error using a Windows 7 installation DVD. If you need a disc to Windows SP1, see 'How to install Windows 7 without the disc' to download and create your own. If you created this disk, you can boot from it and select 'Repair' to try to solve the current problem.

    Select repair your computer. After several screens, you will come to choice. Select command prompt. Type bootrec /RebuildBcd.  Then type Exit

     

    Select "Startup Repair" and let it run. Reboot the laptop.

     

    If you have any other questions, feel free to ask.

    Please click the White Star of KUDOS to show your appreciation

  • PCI1424 - invalid buffer with the acquisition of memory on-board triggered

    Hello

    I need to capture 2 images in a very short interval using a PCI-1424 and a camera Kodak/Redlake. I have to use the amount of memory shipped to capture images. Using the example

    \National Instruments\CVI\samples\IMAQ\Ring\ring mem.prj on board, I added the following code in "int CVICALLBACK Ring"

    Open a session and an interface
    imgInterfaceOpen (intfName, &Iid);)
    imgSessionOpen (Iid, &Sid);)

    ADDITIONAL CODE to TRIGGER

    RES = imgSessionTriggerConfigure2 (Sid, IMG_SIGNAL_EXTERNAL, 0, IMG_TRIG_POLAR_ACTIVEH, 5000, IMG_TRIG_ACTION_BUFFER);

    When the program is run, a timer checks whether there is a valid buffer:

    int CVICALLBACK Imaq_loop (int, int int event, control panel,
    void * callbackData, int eventData1, int eventData2)
    {
    / * definitions here * /.

    static int unsigned lastBufNum = 0xFFFFFFFF;
     
    switch (event) {}
    case EVENT_TIMER_TICK:

    imgGetAttribute (Sid, IMG_ATTR_LAST_VALID_BUFFER, & currBufNum);
    If ((currBufNum == lastBufNum) |) (currBufNum is 0xFFFFFFFF))
    return 0;

    On my old NT system with NOR-IMAQ 2.2, the value of & currBuffNum form imgGetAttribute was always 0xFFFFFFFF, until the first trigger has been received, so basically, return 0; has been performed until the first trigger.

    On XP with NOR-IMAQ 4.0 the first value of currBufNum is always 0 and the call

    imgSessionCopyBuffer (Sid, currBufNum, CopyBuffer, FALSE);

    waiting for the trigger occurs... with side effect, that the image is not really in the buffer 0.

    Is this difference between the IMAQ2.2. and intentional 4.0 or am I missing something? \

    Concerning

    Roland

    I've found a workaround. I use the function

    ImgErrCode = imgSessionStatus (sessionID, & status & currBufNum);

    Instead of

    ImgErrCode = imgGetAttribute (sessionID, IMG_ATTR_LAST_VALID_BUFFER, & currBufNum);

    In this case, currBufNum is 0xFFFFFFFF, until the first image is saved.

    Roland

  • Alienware Aurora R4 MIO ALX Board question

    Hello everyone, I know that this subject and I am about to talk about problem has been discussed over and over again, but I have no where else to turn and do not know how to solve a problem, I have so I'll simplify as much as possible. So basically, I had a case of Aurora ALX of R4 and modified with the motherboard and custom components. I have done all the research before hand and found that particular mother that I would work with the alienware command center and mio Board. I ordered the case and motherboard off ebay I got someone who did the case and all the wires for a living it all for me. I got the case and after a few months rose money to put everything. I finished installing all the operating system (Windows 7 Home premium) all the drivers for the motherboard, my graphics card and set to update everything, including windows. The only problem I encounter is that fans are running high, I can't control the lights, or install Command Center, and the MIO Board is not displayed in my device manager its listed as an unknown device.  Here are the things that I've done so far to resolve the MIO Board.

    1 turn off the computer and removed the power cord then the power button which took place a minute with the power cord removed and plugged the power cord and back on my PC, then checked the Device Manager it says its installed driver software but its still listed as unknown.

    2. installed and reinstalled the command center twice, but doesn't not work or do anything, since the jury is not recognized, the software can't find it.

    3 opportunity Alienware software 32 bit Diagnostics to run the hardware test to see if the Board of Directors in the list it does not work.

    4. install a driver for Asus thermal control that I thought would fix a thermal error that appears in the command center, but did not.

    5. Finally, tried to change the usb cable that connects to the motherboard MIO Board via a header different usb then made power dissapation thing as described above and still no luck.

    So I'm a bit of ideas right now, I can't say if Miss me just one type of software/driver or if I need more recent or not. The Council is still fresh and is not bricked I know, due to the fact that the two lights on the MIO card are still on a bright blue LED one and LED light orange so. Also, when I unplugged the usb cable of the MIO card to the motherboard, fans are silent and all lights work but when I plug it in again and then fans are on max and the lights are out. Any advice/Input would be greatly appreciated.

    Specifications of the computer:

    CPU Intel I7 to 4.0 Ghz

    Motherboard Asus Maximus VII gene

    ASUS Nvidia Geforce GtX 950

    16 GB Corsair Ram revenge

    you posted in lastnight here 22:00, but I have not my notify til today. Bravo, you seem to have picked a winner & get your lights.

    When you have purchased your case & decided to install Windows on a hard disk, this 1st time you booted up, your lights should have at the same time you see your Bios screen & ejected from your dvd tray. Note There are no windows or drivers, just a simple interaction between your gross motherboard bios & mio Board. If I was to eject all my hard drives & turn on my pc, my lights will be lit, my mio Board 'works' without a hard drive. It is hard to say why your last Board was not, however the new works, let's get some software installed for it.

    When you started in 7, you might have kept an eye out in your bar to look for the driver past to install, possibly got a desktop "device driver installation" dialog box or similar, as your way of knowing. Since there is no clear indication in your device manager, you can select USB (& peripheral next HID), Action > search the hardware changes, see what he does.

    Whatever it is, it was me, I would then try to install CC 2.8.9; If the installation fails (error platform), copy / save your temporary files in the temp folder, it created, that you did the last time. When a CC install fails, Council MIO get flashed with the firmware, so spend 2.7 CC, see what happens.

    How should OK, I put it.

    Steps back one, pretend that I did not install 2.8.9. If your curiosity is not satisfied on the windows driver, you can disconnect mio usb, power up / power off, reconnect it shows your systray icon & driver dialog box to see if windows install this driver mio; It will take place without connection, next time he "sees", it it will reinstall the driver, which is the raison d'etre. From there, try installing 2.8.9. Consider this an optional step, if when, earlier you scanned for changes on the usb/hid equipment & 'nothing. '

    What I will say is just me speaking aloud. I noticed that you do not want to move to a CC under 2.6. However, if a version 2.5 recommended by Justin is what you end up with, but you do not want to go back so far (I suppose that you fear a brick flashing firmware), you can try this:

    • put power off, disconnect mio usb, turn on
    • install CC 2.5 hard disk, do not restart, shut down.
    • Reconnect mio usb, power up.
    • Look at your systray icon / installation of the Office driver mio dialog box.
    • launch CmndCntr 2.5, see if it 'works', lights change color, fans have cruise control manual etc.

    It is a workaround, you have installed CmndCntr without the IMU with the firmware flashing & you will be relying on the firmware, it has been flashed with advance by the last owner. If all goes well it is harmony & it all works. If you are satisfied, let it be. You are finished. If for any reason you are not satisfied that, later, you want to try to flash the jury, 2.5 CC to uninstall / reinstall, cross your fingers as we all do, simple as that.

    Note: turn off automatic updates of CC

    the tips here are to not allow an automatic update, for fear of a brick, do not allow

Maybe you are looking for