Simulate the structure of the event in the LabVIEW base?

I have a basic version of LabVIEW (v8.6) who doesn't have the structure of the event. I found it was quite embarrassing monitor the status of several controls (action after clicking a control depends on the State of the other control (s)). Especially if I want to add another function (control), the effort exponentially increase with the current number controls

I had an idea to simulate the structure of the event using "shift register. First, I will provide all the values for the controls in a cluster. Then I'll put the cluster in a while loop and compare the value of the cluster to its previous value (xor the registry change). If the result of the comparison is false (none of the control is changed), the program moves to the next iteration. If the XOR result is true (one of the control has changed), then the program goes into code (it will pass what control has changed and the entire cluster) event management. So for each change of control, we can write an independent code to process the event. After processing of the event, the event was allowed.

Here are some of my ugly code currently used to monitor multiple controls. And I think rewriting using above idea so there is less chance a hiden bug.

Comments, suggestions?

I'm not quite sure what I'm looking for on your photo of your block diagram because it seems that only the lower quarter right in your code.  I would do the following to detect a change in a cluster without the structure of the event control:

The basic package include the notifications than us?  You can put your "event management" in another thread by this method:

The advantage here is your main loop of the program is not "bogged down" every time that a change in your cluster held.  It also allows to separate the code so that it is cleaner.

Hope that helps!

-Fisher

Tags: NI Software

Similar Questions

  • LabVIEW base, protocols supported system of development and the basic features

    Hello

    I ask this question here because I can't find that information on the web, or I get the technical support e-mail response. We are interested in acquiring a license of basis of Labview to start development to develop test for simple automation systems. The basic idea is to have a card with digital, analogue i/o, common seria interfaces: RS232, Ethernet, I2C or SPI. All this to interface HW under test.  A single port for communication with the PC (USB, Ethernet, RS232).

    We would like to know:

    (1) what protocols are supported by the Labview Base development system package.

    (2) if the license mode allows you to integrate MATLAB/C/C++ code.

    (3) in general, where a document that provides details on the characteristics of the Labview. We were not able to find a manual for it. Just this very basic with informaton purchase link: http://sine.ni.com/nips/cds/view/p/lang/no/nid/1385.

    Kind regards

    Jose

    Have you looked at the page 'Buy' for LabVIEW? http://www.NI.com/LabVIEW/buy/

    Basically, I think that LabVIEW base supports everything in terms of basic Windows protocols, but does not include LabVIEW RT or FPGA (for CompactRIO/FPGA targets) but you can use series, ethernet, etc. DAQmx for windows (and also the instrument 3rd party drivers). It doesn't have the enhanced math library or the application Builder so that you can not create executables/installers - you will need run your code in the development environment.

    Alternatively, you can call external code .NET / C dll through the call library function node. You will not be able to incorporate Mathscript, because it is only in the complete edition upward.

  • simulate the arrow key events in labview

    Hello

    I'm trying to simulate the events of arrow (left, right, up & down) key in labview. Lets say, I wish that the events to occurred when a cursor beyond a certain threshlold (later I'll interface with a data acquisition).

    I found this example but I can't find out how to move the arrow keys (and I don't have any experience with User32.dll):

    http://zone.NI.com/DevZone/CDA/EPD/p/ID/3711

    I would really appreciate the help.

    Thank you very much

    I searched for a while, but I don't remember the forums where I originally found this VI so I can't give credit due.

    It is similar to the VI you posted simulating a keyboard, but it would proably your needs better

  • Use the toggle button to simulate the Ctrl key now

    Hello

    I saw someone asked something very similar before, but nobody seemed to know the solution.

    I was wondering if it is possible to use a toggle button to simulate the CTRL key now, the idea being that the user could then zoom in on a rectangle of their choice on a field without having to press the button themselves. I know that you can use the FakeKeystroke function to simulate support that the key however is possible that it may be held?

    Thank you

    I forgot one thing. You must handle the case when you have a real EVENT_DOUBLE_CLICK. In this case, you don't want to reset the keyboardState. Here's the modified code.

    char oldKeyState [256] = {0};
    char newKeyState [256] = {0};
    int isFakeDouble = 0;

    Zoom CVICALLBACK int (int, int int event, control panel,
    void * callbackData, int eventData1, int eventData2)
    {
    HWND hwnd;
    toggleButton int = 0;
    switch (event)
    {
    case EVENT_LEFT_CLICK:

    get the current state of the keyboard
    GetKeyboardState (oldKeyState);
    get the State of the toggle button
    GetCtrlVal (panelHandle, PANEL_TOGGLEBUTTON, & toggleButton);

    If (ToggleButton)
    {
    create the new copy of the keystate
    memcpy (newKeyState, oldKeyState, 1);

    Active control key.
    newKeyState [VK_CONTROL] = 128;
    SetKeyboardState (newKeyState);

    generate left mouse button events that will be holding the CTRL active
    SetActiveCtrl (panelHandle, PANEL_GRAPH);
    GetPanelAttribute (panelHandle, ATTR_SYSTEM_WINDOW_HANDLE, (intptr_t *) &hwnd);)
    isFakeDouble = 1;
    SendMessage (hwnd, WM_LBUTTONDOWN, 0, 0);
    isFakeDouble = 0;
    }

    break;
    case EVENT_LEFT_DOUBLE_CLICK:

    mouse event generated will be taken as a double click. restore the old state of the keyboard
    If (isFakeDouble)
    SetKeyboardState (oldKeyState);

    break;
    }
    return 0;
    }

  • Satellite L850-A845: simulate the middle button of the mouse on the touchpad

    Hello

    Is there a way to simulate 'the middle mouse button' on my laptop Pad?

    I have Satellite L850-A845

    Thanks in advance

    Post edited by: handsah

    Hello

    I put t know if the touchpad software includes this option.
    You should check this in the touchpad options.

    You can find it in:
    Control Panel-> mouse-> tab advanced-> button Advanced settings

    But in my case, this option does not exist.

  • Simulate the entry

    Hello

    To check my software, I want to simulate some signals on the entrance of the simulated NIDAQmx Council. Is this possible?

    I created the jury simulated in NI MAX, but I know not how to simulate the signal on the inputs and run my software (in C language) in order to acquire the data.

    Thank you

    Theinput signal of the simulated device is built-in, you can't change it. It is better to write your own piece of code that simulate the signal.

  • Simulate the sine wave using LabVIEW FPGA with NOR-myRIO and display in real time

    Hello

    I'm relatively new to LabVIEW FPGA. I am trying to test (and later apply) controllers high speed on myRIO.

    At this point, I'm trying to simulate the sine wave from 1 to 10 kHz using Sinewave generator VI express. I also intend to display the sine wave on the time real (RT) using FIFO. However, I had a bit of trouble to understaing various synchronization parameters.

    1. how to encode information about the sampling frequency generating sine wave? (The side FPGA vi requires only the frequency of the signal and possibly phase and does not rate update lines)

    2. how to estimate the number of items in a FIFO? (that is, the relationship between the rate of updates to loop (RT), the signal frequency, sampling frequency and the number of items in the FIFO)

    It would be great if we could share a very simple program (side host and target) that did something similar.

    Thank you

    MILIN

    Milot,

    I think the problem is the type of data in your FIFO. Your FIFO is configured to use a data type of I16. The problem is the number, it displays only ever will be-1, 0 or 1. To resolve this problem, you must send the sine wave as a fixed point data and convert it to a double on the side of the RT. This should significantly improve your resolution.

  • No option to simulate the peripheral cRIO after installing Labview and RT/FPGA Modules of downloads (lack of driver support?)

    Hi guys -.

    Basically, I need to simulate a cRIO device without yet having equipment on-site, like this:

    How to simulate the FPGA hardware target using with LabVIEW Project Explorer

    Instead, I only get the options presented in the attachment "Add Target Options.jpg.  I guess it's because of missing drivers, which I assume is due to an error that I made during a recent new LV installation installation went like this: I downloaded (not diskettes) and installed the following (in this order, the latest versions all around):

    (1) LabView development system

    (2) real-time module

    (3) FPGA module

    (4) NEITHER-RIO (previous installation-by-installation)

    (5) DAQmx

    At the end of (1) and (2), I got the screen shown in the second attachment ("Drivers Installer Message.jpg"), but could not able to recognize the folder "device drivers OR" (I also downloaded), or one of its subfolders.

    According to me, I'm missing an obvious option to load the necessary drivers after installation, but can't seem to find reference to it in the forums.  Could someone give me a little help in the right direction?

    Thanks a lot and have a nice day.


  • Trying to simulate the device USB-6366 (without success)

    I read through the tutorials DAQmx and MAX about the simulation of the device, but I can't yet find a way to effectively simulate the acquisition and generation of a signal using a device USB-OR-6366.

    I am a (given at the entrance of this VI) signal using DAQmx Write and then use DAQmx Read to read the signal captured from the internal memory of the card (which has a buffer of 32 MS). To do this, I created a task with DAQmx I feed in the writing block.

    I know that the approach is most likely wrong, but I can't understand not just how to do this in a simple way and documentation of NOR is anything but simple. All I want is to

    (a) test using 2 digital inputs to capture this signal by the device and then read what she has gained from its internal buffer

    (b) send the same signal to 2 digital outputs the signal output again.

    See you soon

    Yes! the simulation is designed to allow you to write a program and check that it works theoretically even if you do not have the material physically available. It has no interface programming to influence on the what the reading functions will return simulated data. And write the function has no notable effect anywhere, working as a receiver of data in nirvana. It is always useful because you can test software without getting all kinds of errors on the non existing hardware access attempt, but it has its limits, of course. However, a programming interface for manipulating that which and how the data are simulated, while it would be a very interesting feature, is almost certainly to complicated not only to implement but also to use.

  • simulate the arduino serial monitor

    object: simulate the monitor series of Arduino on lab view

    problem: I'm working on a project of graduation of scale and arduino interfacing
    I use an amplifier for the load cell signal, so I have to load the code from the amp to the arduino
    everything is good with the monitor of the series and I get the readings that I'm looking.

    I can simulate these reading lab for further analysis view?
    Thank you

    http://forums.NI.com/T5/LabVIEW/Darren-s-weekly-nugget-06-28-2010/m-p/1162899/highlight/true#M508346

  • Simulate the PXI-1033

    Good afternoon

    I need some clarification on the simulation of PXI via MAX.   I have several PXI modules and a PXI-1033 (integrated into the PCIe MXI) chassis on command.   As they will take several weeks to arrive, of course, I want to simulate these devices and to start building screws

    If I understand correctly the information contained in the knowledge base and forums, all I have to do is to simulate modules PXI themselves in MAX and nothing to simulate PXI-1033 chassis.

    Is this correct?   Guarantees as to any would be greatly appreciated!

    Sincerely,

    Zach

    Hey Zach,.

    You are right. We cannot simulate a PXI-1033 chassis, but because it's just an expansion chassis, there is no need to. You can simulate the modules themselves in MAX under DAQmx devices and then you should be able to start writing code.

    Good luck and thanks,

    Ryan

  • How to simulate the key 'Enter' in VI?

    Hello

    I would like to do the deed in my vi:

    1. open Notepad

    2. type '2 '.

    3. Type "enter".

    The problem is that I am not able to simulate the button ENTER.

    I enclose my vi.

    Here is the link for my reference above.

    http://zone.NI.com/DevZone/CDA/EPD/p/ID/3711

    I'm using labview 8.5.1.

    Thank you.

    Hello

    I think you need to use the BACKSPACE instead of EXECUTION.

    See attached, hope this helps.

  • Simulate the presence of an instrument

    Hi all!

    I read the data of an instrument which is in the laboratory and where there is junt a version of the runtime of labview instaled.

    The instrument is a GPIB multiplexer interface that uses sustainable intensification of CROPS. To get information, I use the VISA palette.

    But every time I change something and need to test, I need compile go to the lab, test, come back to the office, correct something and so forth...

    My question if there is a way to "simulate" the presence of the instrument.

    If anyone can give me a light, I will be grateful!

    Best regards

    Thiago Bach

    Hello

    You use the IVI Drivers to simulate a GPIB Instrument or you write a kind of a personality in LabVIEW.

    Christian

  • How to simulate the change of sim card

    Hi friends

    I want to simulate the functionality of changing the sim. If I'm erasing all data on mobile, then I lost all data. Is there a solution to implement the scenario of change of sim card.

    You can simulate the change of SIM card on Simulator-

    Steps for BB JDE-


    1.) go to the Menu bar - > edit-> preferences

    The Simulator 2 tab.) -> Network tab->

    # ICCID (GPRS) / ICCID override (GPRS)

    # IMSI (GPRS) / IMSI override (GPRS).

    Enter here any value in the format - www.xxx.yyyy.zzzz (e.g. 5600.5478.02145.121)

    3.) click apply. Close.

    4.) now when you run the Simulator, it generates a warning.

    Given IMSI (5600.5478.02145.121) is longer than the maximum length (15).

              Click on continue.

    Steps for Eclipse-

    1.) select your project in the Package Explorer-> right click-> Debug as ->Debug Configurations ->

    2.) select DebugServer from the left pane of the window.

    (3.) the right side of the pane, there are four tabs-> go to the Simulator.

    4.) be that cannot change default Simulator, if we are to make a new profile.

    5.) don't forget the new profile is selected. Now, select network tab.

    6.) steps 2, 3 & 4 above.


    Now, it will give u a simulation of change of default SIM card IMSI value is 666666.01.234567.8

    Thank you

    Kanak Sony

  • How to simulate the Q10 device?

    Hi, is it simulator can be used to simulate the Q10 device (with keyboard)?

    Thank you

    Looks like he has just had an update the SDK and Simulator for Q10

    https://developer.BlackBerry.com/Cascades/download/beta/

Maybe you are looking for