Master and Slave Loops

I'm having problems with my Master and slave loop combination.  I would like to be able to start and stop acquiring data from individual thermocouples. Please help.
Message Edited by nicholas03 on 04-13-2008 03:22 PM
Attachments:
eight thermo.JPG ‏106 KB

Dear Nicholas,
My first advise would be to check the examples on master-slave patterns, and run them step by step, looking at what the data does...
In a master-slave system, you use the queue to pass data from the master to the slave.   You're not passing data in the queue... in stead, you're passing data using local variables, which you should NOT do...  
In the top loops, you should attach the temp array to the enqueue element.   In the bottom loop, you should remove the temp local, and instead get your data from the dequeue vi.
Also, you have to create a queue with the proper variable.   You can create a queue from any variable type, but it has to know beforehand, and the init vi.  
Assuming you want to queue the temp array, you're basic structure should look like this:
It does help if you add your own code, so we can easier edit it for you...  Otherwise we need to use photoshop on your design...
Message Edited by Anthony de Vries on 04-14-2008 11:30 AM
Attachments:
master-slave1.JPG ‏24 KB

Similar Messages

  • Master and slave problem

    Hi Everyone,
    When I try to use the MAster and slave template which is provided by the NI itself, try to understand it how it works, but when  I use this concept to implement in my code, just found there is the problem at there:
    Problem:
    1. The master loop always looping even though there do have a notification from the master to slave but the slave do not respond anything, can't figure the reason.
    2. When the master loop is exit then the slave loop just start to execute but it is too late cos master loop already exit.
    Those senario are different from the master and slave template. need your help.
    Thanks
    William Lee

    Hi Williamlee,
    Thanks for contacting National Instruments, 
    It would be much easier if we could see your code, this will help us work out where the issue is, and to help us understand where you maybe having issues... 
    Also I would like to include some more information with regards to the Master/Slave template.Developer Zone article : Application Design Patterns : Master/Slave and also a webcast on Software Design Architectures in NI LabVIEW
    Kind regards,
    Ashish Naik
    Field Sales Engineer
    National Instruments UK

  • Master and Slave concept

    hi guys,
    i am confused about the master and slave realtionship in ospf. any one can explain it to me in detail.

    Hello Pankaj,
    The Master and Slave in OSPF are a slightly confusing concept but the idea behind it is quite simple.
    When two routers decide to become fully adjacent, they must synchronize their LSDBs. OSPF tries to optimize this: the routers first exchange only the list of entries in their LSDBs. Each router compares the received list to the list of items in its own database, and if it finds that an LSA is missing or is older than one the neighbor knows about, it requests it from the neighbor afterwards. This way, both routers transmit only the missing or updated LSAs, not the entire LSDBs.
    The list of LSDB entries is carried in Database Description (DBD) packets. Naturally, when routers exchange DBD packets, they must be sure all of them have been properly received by the neighbor, so some sort of acknowledgements must be used. There is a problem here, however: the only packets in OSPF used to carry acknowledgements are LSAck packets, but they can only be used to acknowledge LSU packets (more precisely, individual LSAs carried in LSU packets), not DBD packets. How shall the acknowledgements of DBD packets be accomplished, then?
    OSPF uses a polling style of communication with the DBD packets. DBD packets themselves have sequence numbers used for sequencing and acknowledgement purposes. One of the two routers that are in the synchronization phase will be the one responsible for polling the other (i.e. calling it out it to send another piece of information if it has any), each time with an incremented sequence number. This is the Master role. The other router will only be allowed to respond to a DBD poll, never send any DBD packet without being polled immediately before, and the response DBD packet must carry the sequence number of the Master's DBD poll packet. This is the Slave role. The Slave must respond to each Master's DBD packet even if it has no more LSDB entries to advertise; in that case, the DBD response body will be empty.
    So during the DBD exchange, the Master sends DBD packets to Slave, incrementing the sequence number by one in each round. The Slave waits for DBD packets from the Master and only responds to them, and each response carries the sequence number from the last received Master's DBD packet that was used to poll the Slave. Remember: a Slave must not send DBD packets on its own, only as responses to DBD packets received from the Master, and the sequence number of the Slave's response DBD packet must be set to the Master's poll DBD packet.
    While I call the DBD packets as "polls" and "responses" here for the sake of clarity, the DBD packets do not have this distinction indicated explicitly. Any DBD packet sent from the Master, either with a body carrying a list of LSAs or an empty body, is a poll. Any DBD packet sent from the Slave, again either with a non-empty or empty body, is a response. A DBD packet can have an empty body if the router needs to send a DBD packet to the neighbor (either from Master to repeatedly poll the Slave, or from the Slave to confirm the arrival of the DBD packet from the Master) but has no more LSDB entries to advertise itself.
    There are two issues with this simple procedure. First, there is the issue of who out of two synchronizing routers will be the Master and who will be the Slave. This is resolved during the ExStart phase: both routers initially treat themselves as Master routers, and send DBD packets with random initial sequence numbers to each other, indicating the MS flag (Master) in their header. As they do this, the router with the lower RouterID moves to the Slave role, while the router with the higher RouterID remains in the Master role. The ExStart phase is basically finished after establishing the router's role in the synchronizing pair; at most two DBD packets are needed for that, one from each router. The Exchange phase then lasts until routers have exchanged the entire list of their LSDB entries using DBD packets.
    The second issue is more subtle: how should the Master know whether the Slave needs to be polled further? Clearly, a situation may arise when the Master's LSDB is empty or smaller than the Slave's, and the Master will need to send fewer DBDs than the Slave to list all its LSDB contents. As the Slave can not send a DBD packet on its own, it somehow needs to tell the Master to poll it again. This is accomplished by another flag in DBD packet header, the M (More) flag. If a Slave replies to the Master's DBD packet with its own DBD packet and the M flag set, the Master knows the Slave needs to be polled again. The Master will stop polling the Slave after the last DBD packet fom the Slave has the M flag cleared.
    The RFC 2328 has a nice ASCIIart graph of the adjacency coming up:
                +---+                                         +---+
                |RT1|                                         |RT2|
                +---+                                         +---+
                Down                                          Down
                                Hello(DR=0,seen=0)
                           ------------------------------>
                             Hello (DR=RT2,seen=RT1,...)      Init
                           <------------------------------
                ExStart        D-D (Seq=x,I,M,Master)
                           ------------------------------>
                               D-D (Seq=y,I,M,Master)         ExStart
                           <------------------------------
                Exchange       D-D (Seq=y,M,Slave)
                           ------------------------------>
                               D-D (Seq=y+1,M,Master)         Exchange
                           <------------------------------
                               D-D (Seq=y+1,M,Slave)
                           ------------------------------>
                               D-D (Seq=y+n, Master)
                           <------------------------------
                               D-D (Seq=y+n, Slave)
                 Loading   ------------------------------>
                                     LS Request                Full
                           ------------------------------>
                                     LS Update
                           <------------------------------
                                     LS Request
                           ------------------------------>
                                     LS Update
                           <------------------------------
                 Full
    The I flag here is another flag in DBD headers called the Init flag, and is set only on initial DBD packets in the ExStart phase. If the router has established its Master or Slave role, it clears the I flag. This one is not really that important right now.
    The Master/Slave relationship is built and relevant only during the initial LSDB synchronization when a new adjacency is being established. After the two routers go past the Exchange state, DBD packets are not used anymore, and the whole Master/Slave relationship is forgotten. Remember: Master/Slave is relevant only to DBD packets, and DBD packets are used only in ExStart/Exchange phases. Outside of these states, there are no DBD packets used, hence no Master/Slave relationships exist.
    If there are, say, four routers, R1 till R4, connected to the same switch and run OSPF, during the OSPF bootup, there will be 5 temporary Master/Slave relationship built and torn down afterwards:
    between the DR and BDR as they synchronize (assume those routers are R1 and R2)
    between R3 and DR
    between R3 and BDR
    between R4 and DR
    between R4 and BDR
    Notice the Master/Slave relationship existed between those routers that went through ExStart and Exchange into the Full state. Also keep in mind that in the Full state, there are no more Master/Slave relationship present - they were only needed because of the specific needs of the DBD packet exchange.
    Does this make the issue a little more clear? Please feel welcome to ask further!
    Best regards,
    Peter

  • Master and Slave configurations

    Hi
    I am currently wondering why my master and slave configurations dan't work. I have the Rev. B mother board and I set the jumpers to the right spots. I am trying to get my CD Burner to work with my regular CD Rom on the same wire.

    Jarrett,
    my experience with my 3 Beige G#'s (1 desktop and two towers), tells me that a master/slave configuration with two optical drives is not really possible/compatible.
    As a matter of fact, I had to opt for the following solution:
    - Sony 52X burner installed in the CD bay;
    - Iomega 52X USB burner on the USB PCI card.
    I also had a huge number of problems with the master/slave configuration of drives, and it only worked with certain brands of drives.
    For instance, two WD drives would not get along in the same case (data corruption like there's no tomorrow.....)
    I ended up having a WD and a Seagate, which still get a long nowadays in my B&W G3.
    To give you some more curious feedback on the bad habits of the Beige machines........my old G3 now sits in my son's room.
    Believe it or not, I had to remove the Sony burner, as the computer would not boot from it, at all.
    It would read and play CD's but it would not boot, in the most standard of the configurations:
    - CD Burner Master and 1 IDE drive as a slave;
    - SCSI card with SCSI drive;
    I replaced the burner with the APPLE CD-drive form my B&W, and the system started working and booting like magic (I swear....I did not change anything else).
    It boils down to trying and experimenting. I spent countless hours with those machines trying to figure out why the same configuration working on my Beige minitower would not work on my daughter's Beige minitower, exactly identical machines, both with rev. B boards.
    Hope this can help.
    cheers

  • Multiple errors with DSC modules modbus master and slave

    Hi,
    I've searched quite a lot of posts but haven't found solution for my problem. I'm playing with LabVIEW DSC module and it's modbus master and slave functionalities. Even the LabVIEWs own modbus examples (Modbus Simulator and Fundamentals) seem to work randomly or not at all: When checking the Variable Manager utility Modbus Simulator (i.e. modbus slave/server) seems to deploy variables correctly with good quality but Modbus Fundamentals (i.e. modbus master/client) most often shows unknown value or bad quality for all the variables. When running the VIs I get 'Error -1950679035 Unable to locate variable in the Shared Variable Engine' and sometimes some other errors too. If the Modbus Simulator (slave/server) is expected to work fine I guess I should get two slaves communicating, but this isn't happening either. So maybe Modbus Simulator example isn't working either.
    I've tried undeploying and deploying the libraries, stopping and starting the SVE, booting PC, reinstalling DSC module, and setting firewall and antivirus software off. This problem is going on with two different computers, both of which have recently installed LabVIEW 2011, first PC with Win XP and second PC with Win 7. No other OPC servers should be installed to these computers. And what is really interesting, the problem seems to have nothing to do with my network since Simulator and Fundamentals examples are not working even if the network cable is unplugged!
    Any suggestions? Replies are highly appreciated!

    V8 has the same feature, but the words are different.
    The Generator typically uses the Driver time base, and the Gl. Var Write is writing once per block.
    So, to see all values, you must have a block size of one.
    I set up the Driver timebase to 10 Hz, block size of 1. The Generator and the Read Variable default to the Driver timebase.
    The Generator is making a 2 Hz Rectangle waveform. YOu can see that it's shifted, but otherwise intact.
    - cj
    Measurement Computing (MCC) has free technical support. Visit www.mccdaq.com and click on the "Support" tab for all support options, including DASYLab.

  • DNS addresses (master and slave) + personalizing the url address

    Hello.
    My name is Fernando and I published my site using MobileMe (www.fernandoingles.com).
    It’s working already really well.
    But since I’m from Brazil, I built one in Portuguese as well.
    And since the common site endings here are .br I’m trying to purchase the www.fernandoingles.com.br as well but in order to be able to actually buy the site I have to give them two DNS addresses of the place I’m publishing the website with.
    (one ‘Master’ and one ‘Slave’).
    How can I get those addresses?
    And another thing is that I also have my bands site’s published under my main domain name (fernandoingles.com) with my main MobileMe account (but I have the family pack now).
    [www.pipeusa.net and www.pipebrasil.com]
    I purchased those Urls using GoDaddy and they are all properly forwarded already, which means that when the person types those addresses above it already goes to the correct site.
    But what shows on the actual url above is (http://www.fernandoingles.com/fernandoingles.com/Pipe.html).
    And what I would like to appear is only the addresses (www.pipeusa.net and www.pipebrasil.com) instead of my name before them.
    I bought the family pack so that I would have more space and etc... and already put those addresses ((www.pipeusa.net and www.pipebrasil.com and fernandoingles.com.br) as their main domain.
    But since I’m publishing them all using my own iWeb how could I make those extra sites work as their own main sites?
    Would it work if I log in with the desired MobileMe sub-account (let’s say www.pipeusa.net) and then go to iWeb, move that site to the top and them publish it?

    Thank you so much for the response!
    Great option on the added accounts!!
    Since I manage all those sites myself could I manage them all within the same 'log in' or each and every time I need to make a change on one of those sites I must 'log out' of whatever account I'm in and then 'log in' into the account that the change needs to be made?
    And whenever I 'log in' into those accounts (the ones that have the respective domains) should I replace on iWeb before I publish the top site with the one I want to as the main domain or can I just not do anything at all?
    And about the DNS address issue,
    Since I’m from Brazil, I always build two sites, one in Portuguese and one in English.
    And since the common site endings here in Brazil are '.br' I’m trying to purchase the '.br' option of all the addresses I have as well but in order to be able to actually buy the site I have to give them two DNS addresses of the place I’m publishing the website with.
    (one ‘Master’ and one ‘Slave’).
    How can I get those addresses?"
    Thank you so much for the help!!!!

  • Assign my 2 servers as master and slave driver

    I am trying to set up my 2 servers which already have had data and information: one as Master and the other as Slave how to use the unix commands to do this.
    Thank you very much,
    Paul

    Hi Williamlee,
    Thanks for contacting National Instruments, 
    It would be much easier if we could see your code, this will help us work out where the issue is, and to help us understand where you maybe having issues... 
    Also I would like to include some more information with regards to the Master/Slave template.Developer Zone article : Application Design Patterns : Master/Slave and also a webcast on Software Design Architectures in NI LabVIEW
    Kind regards,
    Ashish Naik
    Field Sales Engineer
    National Instruments UK

  • Synchronization - Master and Slave tasks.

    For syncrhonisation (via hardware) of two modlues; one 4330 and 6361, shall I create one master task for the 4330 and then syncrhinise it with the 6361 module? Or create multiple channels say 5 from 4330 and 5 from 6361 and then specify one channel from 4330 to be the master and all the rest modules from 4330 and 6361 to be slave tasks?
    Thanks, 

    Hi Pepis21,
    My name is George and I am an Applications Engineer at National Instruments. I see Luke has already done a good job of helping you but I found a couple of examples that you might find helpful.
    Here is a tutorial that shows a few more examples of how to synchronise channels and devices using a couple of different methods;
    http://www.ni.com/tutorial/11549/en/
    You may be able to see some other synchronisation examples in the NI example finder within LabVIEW under “DAQmx” under “Hardware Input and Output”. I will also link an image of another example below that shows how to use error wires to force dataflow without using flat sequence structures as Luke suggested.
    I hope these are useful for you.
    Regards,
    George

  • Syncronization of 2 USRP in Reception (master and slave)

    Hi,
    When I run "niUSRP EX Rx Finite Sync.vi " for the USRP slave device connected to the master via the MIMO cable. I set:
    Reference Frequency Source -> MIMO
    Timebase Clock Source -> MIMO
    I have the following error "niUSRP Initiate.vi <err> The PLL reference clock About did not lock Within the alloted time"
    Can you help to resolve this problem?
    Can you help me to synchronize two USRP in reception: one slave and the other is the master connected with MIMO cable?
    Thank you
    Solved!
    Go to Solution.
    Attachments:
    niUSRP EX Rx Finite Sync.vi ‏32 KB

    I set this parameters to the master device that is connected directly to my laptop and10 MHz generator and PPS generator::
    IPAdressMaster=192.168.10.2
    Reference Frequency Source -> RefIn
    Timebase Clock Source -> PpsIn
    -----> that's work
    However, when i tried with the slave device that is connected to the master via the MIMO cable :
    IPAdress=192.168.10.3
    Reference Frequency Source -> MIMO
    Timebase Clock Source -> MIMO
    -----> I have the error mentionned in my first message
    Where is the problemem?
    this exemple ("niUSRP EX Rx Finite Sync.vi " ) allow us to verify the good working of slave device?
    thank you

  • Dual spi device with one master and one slave on the PC end

    The powers that be want to emulate a hight speed RS-232 connection to an instrument we are building. We don't want to poll the instrument to see if it has data. They want the instrument to have both master and slave SPI busses so that it can push data to us.
    I need to find the PC hardware to do this that is compatable with LabView so I can test it. It doesn't have to be a single device. It could be two as long as one can be master and the other slave. We have the NI USB-8452 but it can't be slave.
    TIA  Norm
    Attachments:
    Dual SPI.png ‏26 KB

    Hi Viper
    You are right, the 8451 can only be configured as an SPI Master. For creating a slave you would have to choose an FPGA based solution. Depending on the hardware from NI that you currently have, you can choose from different FPGA cards or devices. I found some links that might help you with your search:
    Community: SPI Slave Device in FPGA
    White Paper: Implementing SPI Communication Protocol in LabVIEW FPGA
    Forums: Slave SPI product recomendation
    Forum: SPI in FPGA Multifunctional card discussion
    White Paper: SPI and LV basics (check section 7)
    Hope the information provided is helpful.
    WenR

  • How to make one Mac the "master", and the other Macs "secondary"?

    When using ISync to my DotMac account, and using three or four Macs all synching to one DotMac account, is it possible to designate one particular Mac to be the "most important" or "parent" Mac, and then all others, (laptops), be less important?
    I just want the Address Book on the main machine, the G5 Desktop, to always take precedence, and never get overwritten in any way, by a less refined Address Book on a laptop traveling machine.
    Thank you.

    iSync (or rather .Mac Sync is what you are referring to) does not work like that.
    There is no master and slave relationship in synchronising. All devices are equal and all devices sync their data to all other devices equally. That is what true synchronising is.
    What you are proposing is not synchronising - it is a simple copy and replace operation from one source, and the SyncServices framework is not designed for that.
    The whole point of synchronising is to get away from having a Master data source. You can change data on ANY device (Mac, phone or PDA) and the changes will be synced to all other devices.

  • MASTER/SLAVE PATTERN: how to stop slave loop without stop main loop

    Hi All, I am studying the master/slave loop and saw an examples are like this (only master block shows)
    From this case, as I understand, if we click "set" button, slave loop will run. If we click this button again to mak it "Flase", the slave loop will be stopped as well as the main loop will be stopped as well.
    Now if I have a multi-function main loop, I just want to start or stop slave loop when click "set" button, how can I do it? Thank you very much! 

    bhl3302 wrote:
    From this case, as I understand, if we click "set" button, slave loop will run. If we click this button again to mak it "Flase", the slave loop will be stopped as well as the main loop will be stopped as well.
    Your understanding is completely wrong.  There is nothing in the image you show that would stop either loop.  In this situation the "set" button would normally have a latching mechanical action, meaning that when it is pushed, it will stay true until it is read once, at which point it will return to false.  Placing the control terminal inside the event case causes the terminal to be read and resets the button to false.  With a latching mechanical action, there will be only one event generated even though the boolean will change value twice (from false to true, and from true to false).  You'll never have a situation where you push the button once to set it true, and again to set it false.  However, even if the mechanical action is switching, not latching, it still won't make a difference here - the event case does the same thing whenever the value changes, regardless of whether it's true or false.

  • I use internode and imap. When the ipad deletes emails it also removes them from the mac. How can I reverse this so the mac is the master and the ipad is the slave?ipa

    I use internode and imap. When the ipad deletes emails it also removes them from the mac. How can I reverse this so the mac is the master and the ipad is the slave?

    Thanks for the info. - I now know that deletion works both ways!! - (unlike POP where emails deleted from the ipad also deleted them from the mac even before I could read them,  whereas emails deleted from the mac were not removed from the ipad!!! - ie. the ipad was the master over the mac - the slave).  Prior to changing to imap I used to transfer all nongarbage emails from inbox to mailboxes before my husband could ask if he could delete emails on his ipad. I have noticed however if you do this in imap, they are removed from the inbox on the ipad as well (this did not happen with POP). So we still have to check but the number is less so we like imap better than POP.
    Thank again

  • Master down and slave up

    Hi
    what if the master instance goes down and comes back? As the slave will be still up and running when the master becomes available will there be any synchronization problems?
    Help in finding the solution to this.
    Thanks in advance.
    Mahesh

    No. As soon as your master goes down your slave become master and when old master comes back it join as slave in cluster. See http://crxcluster.wemblog.com/ to understand cluster better.
    Yogesh

  • Activating a switch in a slave loop to active a send button in another while loop

    Hello:
    I am using a master loop with a slave loop to perform a sequence test. I added a Can Bus it runs outside the slave loop I can send commands out through the can bus as long the slave loop is not running the sequences. How can I send commads through the can bus while the slave loop runs, I try using variables and network variables.

    Hello:
    I have attach some pictures hopefully it help to explain my self.
    I added the Can Bus out side the slave loop so it can run continuously, if I place it inside the slave loop it only runs once, it needs to run continuously so to talks back and fort with the control getting or sending commands.
    My file is to large our network does not allow large files to be send
    Attachments:
    Can bus.JPG ‏284 KB
    Slave loop.JPG ‏169 KB
    Slave loop Plus.JPG ‏282 KB

Maybe you are looking for

  • How can i display light in ALV

    hi gurus , i want to use lights in my program. i don know how to proceed. can anyone of you pl  help me with code. An early reply will be highly appreciated.. regards, Neeraj Srivastava

  • Planning Application - Supporting Details

    Hi, We deleted around 4000 members from our planning application and later realised that the few members have budget values tagged to them and also supporting details are included for few of the members. Now we would like to bring back those members

  • Photos Change Color When Published

    Good morning, Wondering if anyone might be able to advise me on why the colors of my photos appear washed out when I publish my iWeb page to a folder. When I open the page in Firefox the colors are not as vibrant and saturated as when they are in iWe

  • OBIEE 10g answer or dashboard parameter default to all values.

    I have an answer report with one parameter "branch", which has multiple values. I build a dashboard which includes the answer report. I want the dashboard to have default branch to all values. How can do that? I tried in answers to set an filter to a

  • How to display the icons of apk files in windows explorer

    How to display the icons of apk files(android apps) in windows explorer by default in windows 7 and windows 8.1 ?