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.

Advertisement

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.

Tags: NI Software

Similar Questions

  • 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.

  • 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 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).

  • 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!

  • 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

  • First try the producer consumer Architecture: continuous play and dynamically update settings.

    Hello

    I am currently working with two instruments; an Agilent E3646A and a NI 6212 BNC. My goal is to have the 6212 continuously take measures according to predefined parameters while the E3646A parameters can be continuously updated. This combination simple instrument aims to help me learn the manual architecture; continuous measurement, output dynamic controls and instruments more will be added in the future.

    I've already posted on a similar, but more complicated configuration (http://forums.ni.com/t5/Instrument-Control-GPIB-Serial/Split-second-lag-when-controlling-two-instrum... and was advised to try the producer consumer Architecture.) I found the documentation on the website (http://www.ni.com/white-paper/3023/en/, https://decibel.ni.com/content/docs/DOC-2431), searched the forums and built my own VI. While my first attempt at a producer consumer Architecture has solved some of the problems I had when I posted on the subject, however, new questions have been raised regarding the reading and adoption of the VI.

    I am currently able to run the VI and update the settings on the device. Previously, I'd get a freeze while the instrument has been updated and could not switch settings until it was done. This has been resolved, although that reading updates only when a parameter has been updated, although it is outside the structure of the event. In addition, the Stop button does not in any context. I also got occasional mistakes on the part of Deqeue, but the major part of the sentence is error-200279 'A tried to read samples that are no longer available' to DAQmx Read. I realize that there is a problem in my loop of producer but have not been able to find a way to solve it.

    This is my first attempt at a producer consumer Architecture and already I can see that it is a powerful tool. I read as much as I could and looked at examples, but should have some problems at the beginning. Would be very grateful of any advice so I can take full advantage of the architecture.

    Hope to hear from you,

    Yusif Nurizade

    You're going to overflow this buffer, unless the events are generated faster than "sample rate/number of samples.   Period.  Nothing could be simpler.

    You don't need a local to stop your curls.

    Try something like this attachment.  I simply moved the structure of the event in its own loop dedicated since it had nothing to do with acquiring data at all.

    Data acquisition loop stops very well when you destroy the task and destrying the stops of power queue (sending the default values of the queue for the power control) for EXAMPLE, to ADD a group of setting 'Safe shutdown' to a 'package' and it wire to the Center terminal (Prototype).

  • Producer / consumer set loop of dynamic data item type

    Hey all,.

    I do a simple exercise of producer / consumer in a loop. In my loop of producer I audio Aqcuerir and in the loop of consumer I'm projecting on a chart

    Everything works as I had in mind, the only thing that bothers me is the way that I had to set the type of the element to the block "Get the tail" at the beginning.

    I knew no better way to get the kind of data that I used to just take an another "acquire its" Express VI and which hang. But that may not be the only way to get there, right?

    Note: I know that I might not need to use a producer / consumer design tend to do, but I need to get hold of technology for school work so I came with this exercise just to get a hang of it.

    Thanks in advance,

    Al.

    Al,

    You just need to feed the correct data type in this entry, which you did by getting the output of a second acquire its Express VI.

    You can also use the "Convert to Dynamic Data" function to do this.  When you drop to the bottom of the function, you will be asked to give the input type.  Tests I've done, it seems not to matter, but for example if you chose the entry to a single scalar type, you need to feed a digital constant (change to double type) in the entrance and use the output of dynamic data such as line item data.

    I don't like the dynamic data type because it is not very clear as to what it is.  Another thing you could do would be to use the "Convert from Dynamic Data" function to change the output of the VI of its acquisition to a different data type for more or less to avoid the original problem all together.

  • Architecture feature producer consumer

    I was wondering if the loop of consumer in a producer consumer architecture works only when the loop of producer send him something, or he still works, even if it receives nothing from the loop of the producer?

    It depends on how you put in place. If you do not have a timeout on the dequeue, he'll sleep until he gets a message. If you have a time-out, it will run if the value of timeout is reached.

  • IMAQ Vision: Is not an Image error when using producer/consumer

    Hi any person

    I used the Vision Express to solve the problem of Patern Machine.

    I want to put Assistant and Aquistion in 2 loop parallel. So I used the producer/consumer to transfer data

    After running VI, I pressed the Stop button and I encountered this error

    I think that getting the queue has a problem. I changed Image to Contant control and connect it to the data type of element. I think that this path is correct.

    So, in case of error, it addressed to Coppy IMAQ in Assistant. So I think that I used the Comunication of the queue is not correct.

    How can I solve this problem

    Thank you

    You can see more detail in the following video: https://www.youtube.com/watch?v=i6FOQ2jypXc&feature=youtu.be

    Try this:

    You should put the image process in the loop of the consumer and release it properly.

  • Programmatically change the number of producers in an architecture of producer/consumer

    Hi all

    I've got 3 momo SoMat I am streaming of data to 10 Hz. I plan on 3 producer loops and loop a consumer to treat.

    I am pretty sure when I show my customer that they want to increase the number of devices. This scuppers then the producer/consumer model unless I change by programming the number of producers and the rest of the architecture associated.

    Is there a way to do this or a better architecture?

    Phil

    As long as there is an ID any in your command of the queue, I do not see why your consumer cannot handle the producers as much as you need.  I would turn the producer code in a Subvi.  Make sure reentrant Subvi.  Then, you can call dynamically that VI as many times as you need, one for each instrument.

  • export to spreadsheet - data 2 channels appear in alternation with loop of producer/consumer

    Hello

    I'm having trouble with the function "Export the waveform to the worksheet" - but it is not clear to me if the problem is with how I use the export feature or if I am wrong concatenating two waveforms of different modules of the series prior to export, or if my queue is wired incorrectly for producer-consumer loops.

    I use a hunts SMU-1073 with SMU-6361 and 4330 modules (tension and strain). I tried to change the example of the "entry analog cross synch" for use with a structure of producer-consumer (see VI below).

    The output of the worksheet contains a large part of the data in the string tension, followed by a smaller piece of data (with timestamp) strain, after which the alternate output data between data of tension and strain.

    Can anyone suggest where I could go wrong, or how I could solve this?

    Attachments do not work, so I'll try to post in an empty message directly after this post.

    Thank you

    Claire.

    That's what I thought.

    A number of wire.  -1 gives all the samples available in the buffer (which can be zero for some reason any).  A number will expect that there are many examples.  If the two readings can wait until they have both the amount of data requested.  This way, they will also have the same number of samples and be better aligned in the text file.

    Your loop will continue to run until you press stop or get an error.

Maybe you are looking for

  • SMS only when the iPhone is on

    Why is must my phone be to get text messaging on iPad and Mac? If the phone is not on the messages do not come. I turned off each device and each turned back. Thank you

  • Satellite U400 - 15 H BIOS update (DOS)

    Y at - it a utility, and if so where can I find this, update the BIOS * back * and * NOT * Windows? The utility + should be + * PHLASH (or PHLASH16) * but each version I download from Internet (various websites) does not recognize my BIOS and does no

  • Network settings tab is empty

    Hello I have connected a Compact Rio 9068 directly to my computer (HP EliteBook 840 G1, Windows 7), and the system appears in the tree view under remote systems in MAX. However, the problem is that I don't see information under the system settings ta

  • Cannot access Internet and all programs on the start menu. How to get rid of a virus on windows xp

    I was recently given a hand computer (compaq I tthink) so I'm not clear about all the fancy stuff to the extent of the ect CPU... but I know it has windows xp pro. in any case, a friend used my computer and for some reason any felt the need to downlo

  • Tablet Dell coming 8 Pro does not start

    Hello The Tablet is only about a year. And I've kept it's safe and sound, no damages or drops. Nothing. But yesterday morning when I got it, he went to sea and no matter what I do, it does not start! I press and hold the start buttong. Nada. I even p