Master/slave with events

Hi, I'm developing an application in which the user actions will initiate certain events.  I've implemented the application as an event-driven state machine.  However, I realized that one of the events must launch a continuous process, i.e. reading from the buffer of a USB device.  It seems that the master/slave model apply.  Is it possible to implement the model master/slave with slave event triggered activity?  I have the feeling of these two designs are incompatible.

Thank you

-Jamie

If I interpret your concern of a straight line, "I thought that a part of the particular event should run completely before any action of the user would trigger another event...» » :

An event Structure maintains a queue of unmanaged manifestations.  When any event registered to a Structure of the event is triggered, LabVIEW places the event in this case queue Structure (you can have multiple records for the same event and LabVIEW will be provided with a copy of the event in each record... a bit more advanced, but it happens more often with user events, since normally you should not have more Structures for a single VI event).  When the Structure of the event is called, it will be the next event unmanaged dequeue and execute the corresponding diagram.  If there is no event in its queue, then he will wait.  If none of the events occur (are added to the queue) at the time where the period has elapsed, while the diagram of time-out is executed.

Which means, the schema associated with a certain event needs to be completed before all other diagrams can possibly run; However, events such as buttons on the user interface, are still captured during execution of the first scheme.

If your diagrams of Structure of the event have long-running code, then you can go out with that have be your only design.  For example, the operations find and initialize in your sound image as an attachment as things just happen once and back relatively quickly, so the button find out the slave device will probably expect you - a slave is discovered, and then initialized by pressing the key, after which your VI is ready to run several diagrams of the event.  However, if one of your States running really persistent operations, such as a schema "" run slave"where you have a collection of persistent data loop, then you will be in trouble since the schema will not end and your UI will probably become numb.

What does not work is if persistent operations are ran asynchronously.  If your slave has something like a "Start ANT Slave.vi" that starts an asynchronous process slave for you then returns, similar to how I would expect the "Init ANT Slave.vi" to behave, then that would work.

What RavensFan and crossrulz have mentioned are ways to achieve this in your design (rather than in the design of the class ANT slave).  Say that your ANT class slave doesn't have any internal asynchronous substance put in place that you can just start, and you will perform all operations running on your block diagram yourself.  In this case, you can create a new parallel to your course while loop.  A form any synchronization mechanism, such as a notifier, could be acquired and transmitted to two loops.  Run the loop of the slave could simply wait on the front warning system it does nothing.  Then in an event run in the upper loop for push button start, for example, you have to send a notifier, stating, "Okay loop slave, please start".  The slave will begin its operations and continue to execute, while your event in the first loop schema would end, and you would still have a user interface responsive.

The design pattern of messages in queue manager is where you have a queue instead of the notifier used in the example above, and you can messages from queue you want the slave to receive (and apparently act accordingly).  Loop of the slave and then check the queue to see if his master has sent something - if so, it performs this action; If this isn't the case, then it executes any action that it deems appropriate.

Tags: NI Software

Similar Questions

  • Design of master/slave with several slaves in SubVIs

    Hello

    I have always used the classic design of master/slave. But now I need a master/slave design in which one loop master main has 3 slaves and each slave, in turn, has 4 slaves.

    I finished my application with the main master, the level of a slave 1 slave 2 ("subslave') level. As I don't want to copy and paste the code for each loop, I thought about creating a Subvi for each loop and link them right in a main VI.

    In order to make it clear:

    Main VI

    -Master (Subvi x)

    --|

    --> Slave 1 (Subvi y)

    ----|

    ---> Subslave 1 (z Subvi)

    ----|

    ---> Subslave 2 (z Subvi)

    ----|

    ---> Subslave 3 (z Subvi)

    ----|

    ---> Subslave 4 (Subvi z)

    --|

    --> Slave 2 (Subvi y)

    ----|

    ---> Subslave 1 (z Subvi)

    ----|

    ---> Subslave 2 (z Subvi)

    ----|

    ---> Subslave 3 (z Subvi)

    ----|

    ---> Subslave 4 (Subvi z)

    --|

    --> Slave 3 (Subvi y)

    ----|

    ---> Subslave 1 (z Subvi)

    ----|

    ---> Subslave 2 (z Subvi)

    ----|

    ---> Subslave 3 (z Subvi)

    ----|

    ---> Subslave 4 (Subvi z)

    But how can I do? How the Notifier sends the notification to the slave if the master is running in an another Subvi?

    Kind regards

    Gracietti

    You place the reference that was obtained for the notifier to the Subvi via the front panel connector.  In the Subvi, you create a control on the front panel which is the same data type as the reference that is created in the main VI.  Set this control on the Panel connection to the Subvi.  Now when you get the reference in the main VI, you can move this thread to the Subvi.

    It is also possible to use named notifiers.  When you get the notifier in the main VI, give it a name.  Get a notifier in the Sub - VI and give it the same name.  Now that you have created two different reference threads, but the point to the same Registrant last name you gave them.

  • Master/slave event Structure vs. State Machine

    Hello

    First some background to the question (skip this paragraph if you are simply interested in the question). I'm relatively new to Labview, after only a few months of coding with Labview and LabVIEW Core 1. Being one of the only people in the company who now knows Labview I have been challenged with the creation of a relatively complex application that will perform a selected ten or to view different tests with customizable options, display, analyze and deliver and automate reports.

    For the application I am writing I need a GUI with several screens (I achieve with tabs), initially I tried this code with the structures of the event within a machine to States (but as you probably know this was fundamentally flawed, that you can't put structures of the event within the structures of the case) (, or structures of the event), but from here, I spent several hours of searching the best alternatives.

    So my Question is: would recommend to use a master-slave (with the structure of the event and the State of computer, respectively), or simply use to continually voting machine status?

    (Keep in mind I'm going to use this as part of a larger facility of producer/consumer.)

    Thanks in advance,

    Joshua Walker.

    I use a case in my state machine specifically for checking to GUI events.  It is usually a "Idle" State or a specific State to 'check events.  I can also set the time-out programmatically by using a register shift, just in case I need to do a quick check (some small timeout) or wait for a user to press a button (timeout is - 1).

  • Issue of cluster master / slave

    Hello

    I read the document here scale for the Information Explosion: Cluster of master / slave with vFabric Postgres 9.2 on vSphere | VMware vFabric Blog... and the document that details how to configure the workspace to use an external postgres DB but missing some info configuration when you use a cluster of master / slave


    When I put in place the cluster needs the url jdbc point to the master host? If the cluster rocking how Workspace knows to point to the secondary host? He ddon'tappear that there is a dedicated cluster IP/hostname can I report?

    Or should I create a CNAME DNS that points to the master and change it manually in a failover event?

    I posted this on the forum of the workspace, but no one was able to answer here.

    Since 9.2.4, vPostgres device includes a couple of scripts dedicated to this task, make your life much easier. If you do not need to do these steps manually on the server. More information here:

    New features in replication of Postgres 9.2.4 vFabric | Next-generation data Blog - Articles of VMware platforms

    Then to manage a transition to a slave in the case of a master failure, JDBC has a base implementation in the code which was introduced last year with 39b085d of validation and you can specify multiple URLS like this:

    JDBC:PostgreSQL://host1:PORT1, host2:port2 / test

    Connection is selected alternately until success. There is no documentation on this subject, but... I'll ping the devs of jdbc to correct this. If you are using an older version of JDBC, you switch to an alternative, such as a layer of tomcat.

  • Problem with sending of master header with XNET API instead of CAN frame API

    Hi nice guys.

    I am using the XNET API to switch Master slave with LIN Protocol task. Since I have no prior experience, there is something problem as the Interface of the NI USB-8476 s cannot be detected. Gifts of windows prompted the following information:

    Error-1074384758 is produced in .vi:1 XNET create Session (single-point output Signal)

    Possible reasons:

    NOR-XNET: (Hex 0xBFF6308A) the name of the interface does not specify a valid and existing interface. Solution: Use a valid and existing interface. These can be obtained by using MAX, XNET properties of the system, or the name of LabVIEW XNET Interface IO. If you use CompactRIO, see the topic "Getting started with CompactRIO" in aid of software and hardware OR XNET.

    but in the MAX of NOR, the device is detected as "LIN0. Even control interface entry in the examples NOR displays the error. But if I take the CAN API of frame, it works well.

    Does anyone have an idea. I'm so appreciate. Tanks in advance.

    Best regards

    Melo

    Dummy me, know that the XNET API still do not support the NI USB-8476 s, which I am applying.

    Kind of hard to use the API NEITHER of MAY to get the feature I need, that seems easy to get with the XNET API.

    Problem solved!

  • What device drivers OR are required to use the configurator with CompactRIO Profibus Master-Slave device?

    I'm trying to deploy the software driver for a portable production that will allow technicians to download configurations of profibus for CompactRIO profibus DP master-slave cards.  I know I need support VISA and MAX in order to communicate with the device when it is in Slot 1.

    I have a Windows XP computer I've used in the past for this and a 7 32-bit Windows development machine that can do as well.  I guess I would need OR-Rio installed and more MAX and VISA, but I run in RIO the right software to install on this machine.  Until I dig a hole more far than necessary can someone point me in the right direction of what is needed to install?

    My development platform is LabVIEW 2010 with SP1.  The development and the production laptop computer work all the two 32-bit Windows 7.  The development machine has the following (and other) software:

    LabVIEW 2010 (RT, FPGA modules) SP1

    MAX 5.3.3

    NI-VISA 5.2

    NOR-RIO 3.6

    We use Comsoft Configurator II 1.2.37

    All reviews are much appreciated!

    Matt,

    I understand the suggestion about Profibus shake appeal reviewer, but I never mentioned the module Profibus - only the NI Compact RIO driver software.

    Ryan,

    I checked that the key and it is present and correct.  Later during some additional tests, I'm done with several other installers throw similar messages.  I've seen CVIRTEDIR and MAXAFWDIR as well.

    I thought at this stage there was another really obscure registry entry who standing things upwards, so I tried to install it (s) even on another unit of the same configuration management.  Installed LabVIEW Runtime Engine 2010 SP1f5, NI-VISA 5.2 (included OR MAX 5.3) and NOR-RIO 3.6.1 and everything works well for use with Configurator II Version 1.2 (September 2011 version 1.09 interface Comsoft TCP sockets, includes LabVIEW 8.6 run time engine).

    In the past I could have resorted to the use of MSI-Blast to clean all the related registry NOR entered, but I couldn't get my hands on a copy and uninstall NOR has not removed the remains (it seems).

    Jason

  • HP Pavilion Elite HPE 310-t: slave master HD with select cable

    Original HD not was not so I added another WD blue for computer to clone original HD BIOS sees second HD but I can't designate master and slave as cloning said to software.   System doesn't see a second HD.  Here is the SATA HD.  I'm not sure if the PC has cable select function.  Boot HD on end connector and second HD on next connector on the cable. Please notify.  Thank you

    Pretty fun little story about the SATA drives connected to a slick IDE, if you read it correctly.  More fun is the tidbit on "master slave and cable select'.»  I have this rate a red herring, scoring 10 for the op.

  • Producer/consumer vs Master/Slave of data loss

    Hello users of Labview,.

    I did experiment with vs p / M/S lately in the context of data aquistion. Many messages did appear (correct me if I'm wrong) that p/c is the correct architecture to if the data retention is desired, so that's what I tried to implement.

    In the loop of producer, I've included 3 Assistant DAQ VIs (2AO, 1 HAVE), which generates data actively and which is being queued. I have 3 other loops of consumers, two of which are consumer 1) written loops of 2) outputs TDMS data of a chart 3) no producer: structure of the event, monitors changes to the user interface.

    When I run data acquisition, the generated file are always half either acquire the half of the sample that I've specified regardless of the sampling rate. I also have a strange displayed graph (see image).

    However,.

    If I replace with a master/slave architecture, this seems to solve the problem.

    So question is: anyone met with this kind of problems? Are there disadvantages to stick with M/S instead of p/c in terms of data loss?

    Thank you

    johnji wrote:

    I think I'm well done

    You are not.  Once an article is removed, he went.  Since you have three loops made of the same queue, each loop will get ~1/3 of the data.  If all the loops are to treat everything, then you want another line for each loop and meet the producer, write to each queue.  You can also use a user event.

  • What master/slave settings the Satellite M45-S331 PSM40U supports

    Hello.

    I need some info if this isn't a problem. My optical drive on Satellite M45-S331 (PSM40U-01R001) died on me.
    So I need to replace.

    I bought a NEC slim model, but it seems that it's not compatible. He worked as a SLAVE and in PIO4 mode I think.

    I contacted the store where I bought it, and they said they need some information abaut what type of optical drive DVD - RW is going in there, so her can replace that NEC with appropriate injector.

    They said that they need some settings MASTER/SLAVE of abaut info optical drive that goes into M45

    Thank you

    Marko

    Generally, the drive must be connected to channel 1 as a master drive. You can imagine as follows:

    Channel 0 (primary)-> Master-> HARD drive
    Channel 0 (primary)-> slave-> HDD or none

    Channel 1 (secondary)-> Master-> CD/DVD drive
    Channel 1 (secondary)-> slave-> none

    Hope I could help you :)

  • Satellite Pro 6100: which drive and the connection is supported - master, slave and CSEL?

    Hello

    I want to install a Pioneer DVR - K14L DVD burner.
    After installation, the notebook show me a
    error during initialization.

    It is possible to use this type of DVD Slimline burner?
    What kind of modus is important (master, slave, or CSEL)?

    Thank you and

    Best regards
    oelauge

    Hello

    I guess you get an IDE # 1 error message. Am I wrong?
    The fact is that not all readers are compatible with laptops.
    I don't know what parameters should have the caught player supported. But I assume that it might be a CSEL.
    However, I found this DVD - RW drive that must be compatible; the reference is P000366780
    http://www.getpartsonline.com/p000366780.html

    But unfortunately, there is nothing on the assignment of pins and settings.
    If you want to be sure of devices supported on your laptop computer at 100% so you should ask the Toshiba service partner in your country for details

  • Pavilion p6235 uk: master/slave

    Hello. I installed a second 1 TB HDD in my PC, which has recognized and gave him a letter.

    It is not used, at all, because I wanted to be able to boot from it if not able to boot from drive C; but then, I discovered that I need to install the Windows operating system on it, and I don't have the disk.

    What I want to do now is make the slave with the master drive C drive drive. I have instructions that involve to go upward in the setup of the BIOS at startup.

    I did it, I think, but I don't understand what I'm looking at. I don't see CMOS configuration, including the statement tell me to look for.

    I'm not even sure I'm pressing the right key to statrt upward. I pressed F10, but he should have F1?

    I just need more guidance on how to implement the master/slave system with my two hard drives on this particular type of PC... Thank you, Laurencewithau.

    Hello @laurencewithau,

    I read your post about how you're looking to activate the C: drive as master and the second hard drive as slave on your desktop. Are your two hard drives IDE or SATA? Is that 1 TB hard drive is IDE, how are you linking to your motherboard? If all of your drivers are connected via a SATA connection, you don't need to enable readers to master/slave. If your C: drive that is already to start Windows, then it is assigned as the main drive with any additional disk automatically assigned as secondary.

    Please re-post with the necessary information, so I'll be capable of this search for you. I look forward to your reply!

    See you soon!

  • Unable to set DF Profi II as a master - slave Auto SUR?

    Hello

    I am trying to configure a Profi II PCI DF as a master device. I'm unable to do as it appears that it may be on automatic mode Slave.

    When I try to use the Comsoft Configurator II to download the master-slave on the PCI card, I get this error:

    I then tried to use a .vi (DFP2_Initialistion.vi) file to set the PCI as the master.

    Configure it as slave works very well, as shown here:

    However, when I use the same file to set the PCI to a master, I get this error (error 18: there is no such thing as LabView - Pen):

    I guess mistakes Comsoft Configurator II and LabView are linked and could be due to the Auto-esclave being enabled on the PCI mode. I can't find anything which touches on the way of AutoSlave in the documentation, does anyone have information on how to solve this problem?

    Thank you.

    Hi again of the opinion,

    Thank you for the logs - I spent those on Aaron D, which I believe you have worked with on that! I'll follow up with him and see if we can find a solution for you.

    Thanks again!

  • Master/slave producer/consumer Feeback?

    We know that in the models of master/slave and producer/consumer can send information of the master loop or a producer to the loop of the slave or the consumer.  But what to get information of the loop of the slave/consumer back to the master/producer loop?  I think it may return some sort of output or a message saying something like "I finished my work successfully.  This can be done with local variables, but is it really a good idea?  Is there another better way?   In addition, in this case can I just use a sub - vi?    I don't know that I always get the PARALLEL treatment offerred by master/slave and producer/consumer with a sub - vi.

    You can use a notifier to send a return message.  You can use a local variable, but unless you know what you are doing, you might encounter problems with race conditions.

    Sub - VI have nothing to do with producer/consumer architectures.  You can do a p/c with or without sub - VI.  Sub - VI is a way to break the code in significant functional blocks.

  • Producer/consumer or master/slave, acquisition, control, analysis and recording of data

    Hi all

    I have NEITHER cDaq-9188 and its modules NI 9214 (thermocouple), NI 9203 (HAVE current) and NI 9263 (AO tension). I need to measure the temperature and pressure, and according to these data, I need a frequency converter to drive a compressor control. I've developed acquisition, analysis and recording program by the use of the state machine, the design of producer/consumer model and I have no doubt about their. They all work very well. Now, I need to add a control program in their. The problem is that I need to check the compressor with feedback from temperature data permanently, but I do not necessarily all the data acquired and permanently from the results of the analyses. For example, I need to record data once in 30 seconds. Which model desing should I use for this task?

    Edit: I was not able to find examples of advanced program relevant to the design of master-slave model. If you know where to find them, could you write in this thread please?

    The declarant buffer not data.  Do only the queues.  A new notification replaces the old value if she is ever read or not.  You would be loss of data with the notifiers if the loop of consumers with a notification utility cannot keep up with the data that they fade.

    What I show all the data buffers through the queue in the loop of the producer.  The queue of the consumer removes all data and do stuff with him (such as logging) if the elapsed time is over.  What is the problem with that? That is what for (imstuck) described in his message.

    The other alternative is that you put the timer into the loop of the producer.  Have the Boolean value TimehasElapsed drive a deal structure this place only the data if the time is over.  In this case, only some data gets queued, and consumer loop removes all data as it gets and it opens a session.

  • Master/slave server is not accessible

    We have server standalone install, but then I go to system-> finder object and try to look for something: I got the following error:

    "Master/slave server is not accessible.

    This usually indicates a problem with the user identity system. Go to common Services > server > Security > identity system configuration. Re-enter the user name and password and ensure that points of user name for an account with full access to all applications of the LMS and tasks.

Maybe you are looking for

  • Photosmart HP 6510

    Trouble started after I went into Notepad and has documented a moment, then when you print the document, there were many areas that did not print so I got a new black ink and now nothing but print blank pages. I turned the printer, unplug the usb cor

  • How to do a reset DAQmx

    Hello I use the PC6229 OR with an interface SCB-68 box. I generated a pulse of 100 kHz with the Assit DAQ on Dev/ctr1. His being fed in Dev/ctr0 and I set up a counter manually with the DAQmx. I want to know how to reset the counter so that the initi

  • HP19-2113w: how to stop audio playback in the background IE Toyota

    Toyota ad runs in embarrassing background

  • Remove button

    On all my other computers when you send an email that I could just high lite the other address and press the delete button and they went 99% of the time.  I have to use the BACKSPACE key or the letter of a button Delete at once so that other peoples

  • Access to corporate blackBerry Smartphones via wifi if e-mail isn't on a support

    I have a torch 9810 via AT & T. If I turn the cell off the signal and just use wifi, I get all my emails professional very well. Don't need a cellular signal. What happens if I cancel AT & T altogether and do not replace it with any carrier. Then I c