Send two signals at the same time to serial

Hi
I have a problem in that I want to control some relay boards by serial. The boards have an address byte (to determine which of the three relay boards) and a relay combination (four relays on each board). The .vi I will need to make will be sending data to the serial as a result of feedback from sensors (they are currently simply controlled by timers to simulate) so there is a good chance that there will be two relay addresses sent at the same time and consequently much confusion. The timed simulation demonstrates this possibility by switching all relays on at the start.
Is there a way of avoiding this? Any help would be much appreciated.
Many thanks
Alastair

Alastair,
When you say send to multiple boards "at the same time" exactly what to you mean? On a serial port only one byte at a time can be sent. You do not specify how many bytes are sent to each board to handle the addressing, the data, and any EOT (End of Transmission) characters.
I can think of two possibilities.
1. Relays are slow. If the transmission rate is fast enough, you could send messages to all relays sequentially over the serial port but still have the appearance of simultaneous activation of the relays. If the relays switch in 10 ms and each command contains 6 bytes, sending the data at 115 kilobaud would take about 1.5 ms for three boards. This would likely be close enough to simultaneous for relays.
2. Add a command similar to the GPIB GET (Group Execute Trigger). All devices on the bus respond to this command by executing a previously stored command. No addressing is used for this command. This does require that the relay boards be modified to respond to their address and to the common or group address and to store a command for later execution.
Lynn

Similar Messages

  • Generat two signals at the same time and reading voltage

    Hii
    i have try to generate two signals at the same time and read voltage from another port on the board(not have to be at the same time), i have not alot of expriens in labview
    and i based my code of example(http://zone.ni.com/devzone/cda/epd/p/id/5197) from yours site and try to suit to my needs
    now my problem is when i generat the 2 signals(that work perfect) i canot read voltage from another port on my CB-68LP
    i can not find the problem  and make it over i hope there is away to figer out and fix it.
    i have two cards 6229, and two CB-68LP board.
    labview 8.5.
    my code is look like this - http://img142.imageshack.us/my.php?image=scrennshot2no2.png
    (this works perfect).
    and this is my code after suit to my need - http://img183.imageshack.us/my.php?image=scrennshotfl5.png,there is  error exception at  the right side.
    the exception-
    Possible reason(s):
    Specified route cannot be satisfied, because it requires resources that are currently in use by another route.
    Property: RefClk.Src
    Source Device: Dev1
    Source Terminal: 10MHzRefClock
    Required Resources in Use by
    Task Name: _unnamedTask<0>
    Source Device: Dev1
    Source Terminal: None
    Destination Device: Dev1
    Destination Terminal: RefClock
    Task Name: _unnamedTask<1>
    eyal

    sorry...
    The AO tasks is very important they will be synchronize ,it is very importent the two tasks will start at the same time
    and after it run at synchronize mode i will need to make reading of voltage
    i gust try to make simulation of machin (i give that machin AO and reading from it voltage that all)
    first of all i make the two signals(synchronize signals).
    and after it i will need to reading voltage.
    i can make two signals synchronize together.
    i can make reading voltage
    but i can't make two signals synchronize together with reading voltage
    it throw to me this error message.
    i am looking for away to figer this out.
    thank's for any help 
    eyal
    Attachments:
    test11.vi ‏130 KB

  • How to count frequency of two signal at the same time ?

    Hello every one
    please help me with this one i am really stuck.
    The situation   : I have two square wave signal, and i want to measure the frequency of both of themat the same time.
    the problem : Error -50103 occurred at DAQmx Read (Counter DBL 1Chan 1Samp).vi:3
    Please see the attachement.
    i also have 3 analog inputs to be measured.
    but i dont have any problem with the analog inputs,,,multiple analog  inputs can easily be measured,,,,,but the prob lem is in the digitl (square wave ) signals. 
    Attachments:
    i want to use two counter input.GIF ‏54 KB
    two counter tasks1.vi ‏250 KB

    NI has an excellent overview of the accuracy and tradeoffs of the different freq measurement methods titled  "Making Accurate Frequency Measurements."  To boil down the essence of it, the (possibly) increased accuracy of the 2-counter method depends on a relatively long collection / accumulation time which would in turn typically limit the rate at which you could update your measured freq value.
    Now let me offer some friendly but blunt advice.  LabVIEW makes it easy to collect data.  However, there are many other factors affecting the usefulness of that data.  I support the dictum: "It is hard to measure *well*."  Choice of sensors, their sensitivity to environment, various sources of noise, an understanding of the decision to be made from the data, programming methods, etc.  And even more etc.
    What I mean is that just because a hardware freq measurement can be performed that is precise to 1 part per million, it would be very RARE in a test that ALL of those 6 significant digits prove useful.  In your app, the measurements are presently only approximately correlated in time.  And the gap of blind time between measurements will usually represent a much longer period of time than the measurement itself.
    Analogy: suppose you had a 100 minute film at 25 frames/sec for a total of 150_000 frames.  Now start selecting individual frames that are separated by some random # of frames between about 200 and 500.  In the end, you may end up with a sequence of 400 frames in the correct order.  Each individual frame is VERY accurate, but the collection of all of them can zip by in 16 seconds and not give you a much understanding about the movie.
    What would usually work out much better is to sacrifice some accuracy in order to collect a greater quantity of frames.  You trade off the instantaneous accuracy for the overall coherency.
    Sorry, got on a roll...   Back to your question.  My own preference is almost always to avoid consuming hardware resources when not truly necessary.  I've been toying with counters for many years and have still never once deployed an app using a 2-counter frequency measurement.  I do the 1-counter measurement and save the other counter(s) for other purposes. 
    If you've got an M-series board, the 80 MHz timebase allows you to measure a 500 kHz pulsetrain with a quantization error of only about 0.06% (1 part in 160).  There's a pretty fair chance that whatever physical process emits that pulsetrain isn't appreciably more stable than that
    -Kevin P.

  • Can airport express send a G and a N signal at the same time?

    I have two macs with wireless N in my home, and two pc's with wireless G. Can the airport express broadcast a wireless G and N signal at the same time? or does it need to be one or the other?

    I purchased 2 airport expresses today and the answer to this is yes

  • Telnet two devices at the same time 1 C# program

    Hi, currently I have one 100% working program used to telnet my Arduino circuit.
    I use this C# class found somewhere around the web: Anyway, without this forum, I wouldn't be able to finish my program.
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Net.Sockets;
    namespace USSR
    enum Verbs
    WILL = 251,
    WONT = 252,
    DO = 253,
    DONT = 254,
    IAC = 255
    enum Options
    SGA = 3
    class TelnetConnection
    TcpClient tcpSocket;
    int TimeOutMs = 100;
    public TelnetConnection(string Hostname, int Port)
    tcpSocket = new TcpClient(Hostname, Port);
    public string Login(string Username, string Password, int LoginTimeOutMs)
    int oldTimeOutMs = TimeOutMs;
    TimeOutMs = LoginTimeOutMs;
    string s = Read();
    if (!s.TrimEnd().EndsWith(":"))
    throw new Exception("Failed to connect : no login prompt");
    WriteLine(Username);
    s += Read();
    if (!s.TrimEnd().EndsWith(":"))
    throw new Exception("Failed to connect : no password prompt");
    WriteLine(Password);
    s += Read();
    TimeOutMs = oldTimeOutMs;
    return s;
    public void WriteLine(string cmd)
    Write(cmd + "\n");
    public void Write(string cmd)
    if (!tcpSocket.Connected) return;
    byte[] buf = System.Text.ASCIIEncoding.ASCII.GetBytes(cmd.Replace("\0xFF", "\0xFF\0xFF"));
    tcpSocket.GetStream().Write(buf, 0, buf.Length);
    public string Read()
    if (!tcpSocket.Connected) return null;
    StringBuilder sb = new StringBuilder();
    do
    ParseTelnet(sb);
    System.Threading.Thread.Sleep(TimeOutMs);
    } while (tcpSocket.Available > 0);
    return sb.ToString();
    public bool IsConnected
    get { return tcpSocket.Connected; }
    void ParseTelnet(StringBuilder sb)
    while (tcpSocket.Available > 0)
    int input = tcpSocket.GetStream().ReadByte();
    switch (input)
    case -1:
    break;
    case (int)Verbs.IAC:
    // interpret as command
    int inputverb = tcpSocket.GetStream().ReadByte();
    if (inputverb == -1) break;
    switch (inputverb)
    case (int)Verbs.IAC:
    //literal IAC = 255 escaped, so append char 255 to string
    sb.Append(inputverb);
    break;
    case (int)Verbs.DO:
    case (int)Verbs.DONT:
    case (int)Verbs.WILL:
    case (int)Verbs.WONT:
    // reply to all commands with "WONT", unless it is SGA (suppres go ahead)
    int inputoption = tcpSocket.GetStream().ReadByte();
    if (inputoption == -1) break;
    tcpSocket.GetStream().WriteByte((byte)Verbs.IAC);
    if (inputoption == (int)Options.SGA)
    tcpSocket.GetStream().WriteByte(inputverb == (int)Verbs.DO ? (byte)Verbs.WILL : (byte)Verbs.DO);
    else
    tcpSocket.GetStream().WriteByte(inputverb == (int)Verbs.DO ? (byte)Verbs.WONT : (byte)Verbs.DONT);
    tcpSocket.GetStream().WriteByte((byte)inputoption);
    break;
    default:
    break;
    break;
    default:
    sb.Append((char)input);
    break;
    My UI Code:
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.IO;
    using System.Linq;
    using System.Net;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows.Forms;
    using System.Net.Sockets;
    namespace USSR
    public partial class mainForm : Form
    TelnetConnection tc;
    public bool keyPressChecker = false;
    public bool connectedChecker = false;
    public mainForm()
    InitializeComponent();
    // webBrowser1.Navigate("http://admin:[email protected]");
    this.tc = null;
    this.connectedChecker = false;
    private void radioButton2_CheckedChanged(object sender, EventArgs e)
    try
    if (submarineRadioBtn.Checked)
    System.Diagnostics.Process.Start("dummySub.exe");
    catch (Exception ex)
    MessageBox.Show(ex.ToString());
    private void centerBtnCamera_Click(object sender, EventArgs e)
    private void forwardBtn_Click(object sender, EventArgs e)
    if (connectedChecker)
    this.tc.WriteLine("W");
    private void connectToolStripMenuItem1_Click(object sender, EventArgs e)
    try
    //create a new telnet connection
    tc = new TelnetConnection("192.168.0.102", 23);
    if (tc.IsConnected)
    connectedChecker = true;
    catch (Exception ex)
    MessageBox.Show(ex.ToString());
    private void controlKeyDownCheckBox_CheckedChanged(object sender, EventArgs e)
    if (controlKeyDownCheckBox.Checked == true)
    keyPressChecker = true;
    else
    keyPressChecker = false;
    private void controlKeyDownCheckBox_KeyDown(object sender, KeyEventArgs e)
    if (keyPressChecker == true)
    if (e.KeyCode == Keys.W)
    if (connectedChecker)
    tc.WriteLine("W");
    if (e.KeyCode == Keys.S)
    if (connectedChecker)
    tc.WriteLine("S");
    private void reverseBtn_Click(object sender, EventArgs e)
    if (connectedChecker)
    tc.WriteLine("S");
    private void disconnectToolStripMenuItem_Click(object sender, EventArgs e)
    try
    tc = null;
    connectedChecker = false;
    catch (Exception ex)
    MessageBox.Show(ex.ToString());
    private void controlKeyDownCheckBox_KeyUp(object sender, KeyEventArgs e)
    if (keyPressChecker == true)
    if (e.KeyCode == Keys.W)
    if (connectedChecker)
    tc.WriteLine("O"); //decrease to MID PT.
    if (e.KeyCode == Keys.S)
    if (connectedChecker)
    tc.WriteLine("P"); //decrease speed to MID PT.
    private void exitToolStripMenuItem_Click(object sender, EventArgs e)
    Application.Exit();
    Now, what I want to know is this: IS IT POSSIBLE FOR MY C# PROGRAM TO TELNET TWO DEVICES AT THE SAME TIME? 
    Thanks
    Glenn

    try this links :
    http://www.codeproject.com/Articles/19071/Quick-tool-A-minimalistic-Telnet-library
    http://stackoverflow.com/questions/25116077/send-and-receive-commands-via-telnet-in-c-sharp
    http://stackoverflow.com/questions/12283241/ssh-to-server-then-telnet-to-device

  • Write a progarm to test two parts at the same time

    Hi:
    I need to write a program in LabView that is capable of testing two parts at the same time.
    Explanation:
    I star the test on a unit, once all the electrical test is done move that unit to the pressure test without loosing the current test information and continue the test of the unit thewn generate a serial number only if it passes all the test. Then while the previous unit is going thru the pressure test star testing another unit for the elecrical test and so on.
    I am using LabView 2012

    From what you have described, I agree with what has been answered above. TestStand is specifically designed for. If you would like to provide more information about your application we could give you a more detailed response. For more information about TestStand follow this link
    www.ni.com/teststand
    Ryan
    Ryan
    Applications Engineer
    National Instruments

  • Is there a way to show two angles at the same time in the final edit rather than switch between them with Multicam?

    Can I show two angles at the same time in the final edit rather than alternate with Multicam?

    Stack two clips on top of each other and reduce the sizes. I think that's what you want.

  • One again, "can I use CC on two computers at the same time?" - in practice.

    I know this has been asked before and all those threads are locked. Many asked the question, but I haven't found a satisfying answer yet.
    Can I multi task with CC?
    I want to have my laptop next to my desktop. And while I render, export or whatever my newly shot documentary on the laptop I want to work with a music video project on my desktop. Then when the render is finished I render the music video and go back to the laptop and continue on the documentary. Or maybe I just work 5 minutes on the desktop music video, then come up with something brilliant for the project on the laptop and switch. Back and forth. Will that kind of activity result in any kind of limitation, usage-wise?
    So, working on Premiere on my two computers at the same time.. is it possible? Technically? I know the EULA says "only one person". But will it let one person mutli task?
    I need to know this before I buy. sorry for asking this again, please bless me with a clear answer

    Hi Jimmy Crim,
    Yes in case of Creative cloud subscription you are allowed to install and use the cc apps in any two machines.
    Even if you want you care allowed to use these apps together in both the machines.
    Thanks
    Kapil

  • Can I access two websites at the same time?

    Does Dreamweaver have the ability to open two websites at the same time?
    I basically have a CMS hosted on one server, that connects to my clients sites on other servers. I want to be able to open files on one server and edit them and also edit files on another server at the same time.
    If this isn't available in Dreamweaver, then I think it should be. I often need to copy code from one page in a site to another page in different site. To have the ability to have two windows open, each connected to a different website server would be invaluable to me. By having separate windows, each can have its own server connection. I don't know how easy that would be, but I'd love it!
    Cheers
    Glynn

    You can only connect to one site at a time.  And you need to edit files locally, save & then upload to the remote server.   AFAIK, no single FTP app is capable of connecting to more than one server at a time.  You might be able to do what you want with DW open and an additional 3rd party FTP client like Filezilla, each connecting to different servers.
    Nancy O.

  • How can I open two libraries at the same time on itunes?

    Hey i need help on opening two libraries at the same time on itunes. I don't know if that is possible but need some advice if its possible. I already have several libaries but I need to compare labaries at times due to various users on my computer. Please help .

    Not that I'm aware of. What exactly is that you want to achieve? There are tools for scanning media folders and adding any files not listed in the library, or deleting those that no longer exist. There are also ways to use one library for multiple users so that any tag update gets applied for everyone.
    tt2

  • How can I start two Vi at the same time?

     I have two Vi's, each of these Vi has a stop button. I want to start these two Vis at the same time. I also want to be able to stop the two Vis at the same time. What should I do? Thanks.

    One way to start them is with an Invoke Node and the Run method. You can then stop them with the Set Control Value [Variant] method. When you use the Set Control Value [Variant], you just have to specify the name of the front panel control that stops the while loop. Older versions of LabVIEW only had the Set Control Value method in which you had to use the flatten to string function to pass the Type Descriptor and Flattened Data.
    Message Edited by Dennis Knutson on 03-20-200609:35 AM
    Attachments:
    Run Method.JPG ‏44 KB

  • How to make this two things at the same time ?

    Hello
    When my mouse is on a area, I need :
        -  to show a object (a rectangle inserted with the toolbar)
        -  to show a caption
    I think it's not possible to do this two things at the same time when I use the rollover functions (Rollover caption or Rollover Image).
    I would like to use a button, but the button works only if I click it, and not when I just pass my mouse on it.
    Someone have an Idea?
    I can't use Javascript.
    Thanks

    Rick is correct.  You can use the Rollover Slidelet's rollover area to trigger an Advanced Action.  You'll need to create this Advanced Action with two clauses.  One to SHOW the caption, and the other to SHOW the rectangle.
    Your alternative to the rollover slidelet is to use an Event Handler widget attached to the object that the mouse should roll over.
    The Event Handler will detect when the mouse is over the object and trigger its own Success criteria.  You can then use the widget's ON Success event to trigger the Advanced Action as mentioned above.
    More information about using the Event Handler here: http://www.infosemantics.com.au/adobe-captivate-widgets/download-free-trial-widgets
    An example of using it to do two different things on the same object can be found at this web page: http://www.infosemantics.com.au/adobe-captivate-advanced-elearning-tutorials/beat-adobe-ca ptivate-interactive-catch22
    Trial versions of the widget can be downloaded from here:  http://www.infosemantics.com.au/adobe-captivate-widgets/download-free-trial-widgets

  • Any way to play two clips at the same time one over the other? (transprent)

    Any way to play two clips at the same time one over the other? (transprent)

    Yes.
    See the information here for a variety of ways to do this:
    http://discussions.apple.com/thread.jspa?threadID=933500&tstart=50
    http://discussions.apple.com/thread.jspa?threadID=903151&tstart=0
    http://karsten.schluter.googlepages.com/jackiechancredit
    http://www.geethree.com/slick/V_04.html

  • If I have two appointments at the same time, they overlap in the iOS 7 calendar rather then appearing side-by-side so that I can't read one of them due to the identical colors of the two appointments.  Is there any way to fix this with a setting?

    If I have two appointments at the same time, they overlap in the iOS 7 calendar rather than appearing side-by-side in the daily view, so that I can' read both of them due to the same background color.  Is there a way to change this via a settings change?

    I fyou have "all day" event that are taking up the entire day, check the event. All day event only appear at the top of the time line (and just below the week view). I suspect they are not actually set up as all day, but have specific time frames assigned.
    In teh screen shot below, "Sample" is an all day event; NFL: CAR@SF is not.

  • Re: if weblogic can serve two ports at the same time?

    That's not true. WebLogic supports a non-secure and secure listener port at the
    same time. That was one of the selling points for my organization.
    Michael Girdley wrote:
    If, you mean the same port on two different IP addresses, then the answer is
    yes.
    If, you mean two different ports on the same IP address, then the answer is
    no.
    Thanks,
    Michael
    Michael Girdley
    Product Manager, WebLogic Server & Express
    BEA Systems Inc
    fxy <[email protected]> wrote in message
    news:8fdk99$t9$[email protected]..
    <URGENT QUESTION>
    I'd like to know if weblogic can support two ports at the same time.
    thank you in advance.
    <URGENT QUESTION>

    Well, the question was really meant to see if any change was made to WL to support
    this, not because I didn't believe Michael Girdley.
    P.S., this is something Websphere 4.0 let's you do...In case this encourages someone
    to add this support.
    "Mike Reiche" <[email protected]> wrote:
    >
    If you don't believe Michael Girdley, then I don't know why you would
    believe anyone
    else. I believe the answer is still 'no'.
    Why do they 'have to be on different ports'? We block requests by URI
    - so just
    block all requests to /youradminapp/* at the firewall. Or you can block
    them at
    your Web Server. Or restrict them by user in WL.
    Mike
    you"Anil Arora" <[email protected]> wrote:
    Is it still true that WL 6.0 cannot host multiple (non-secure) HTTPports
    on one
    server? We need this capability within one JVM to allow one web application
    to
    be accessed from one port while another through a second port. Forexample,
    we
    have a application to be exposed through the firewall at port 7001.
    Then we have
    another admin application to only be accessed within the firewall. But
    they need
    to be deployed within the same JVM since they may have shared statebetween
    them.
    Thanks,
    Anil
    "Michael Girdley" <[email protected]> wrote:
    I'm sorry, to clarify my statement: I was speaking about nonsecure
    communications. Weblogic can only support one listener port at a time.
    Thanks,
    Michael
    Michael Girdley
    Product Manager, WebLogic Server & Express
    BEA Systems Inc
    Allen Akers <[email protected]> wrote in message
    news:[email protected]...
    That's not true. WebLogic supports a non-secure and secure listenerport
    at the
    same time. That was one of the selling points for my organization.
    Michael Girdley wrote:
    If, you mean the same port on two different IP addresses, then
    the
    answer is
    yes.
    If, you mean two different ports on the same IP address, then theanswer
    is
    no.
    Thanks,
    Michael
    Michael Girdley
    Product Manager, WebLogic Server & Express
    BEA Systems Inc
    fxy <[email protected]> wrote in message
    news:[email protected]...
    <URGENT QUESTION>
    I'd like to know if weblogic can support two ports at the same
    time.
    thank you in advance.
    <URGENT QUESTION>

Maybe you are looking for

  • GUI_DOWNLOAD in Excel format

    Hi Gurus, I am using GUI_DOWNLOAD for excel (.XLS) format I Used *FILETYPE                        = 'ASC'   / DAT WRITE_FIELD_SEPARATOR           = 'X' My problem is the data not getting  proper excel format. thanking you. Subash

  • Very urgent! Basic informations

    Hello! My question are very easy : I just need some definitions for a report! What does the TBS_SYSTEM, the TBS_RBS, the TBS_TEMP? Some easy definitions would be great! What is an instance (with easy sentences...)? Thank you very much for your help!

  • Is there any one in HP that pays any attention to the customer?

    I have had numerous PC's and laptops in my work and at home and have bought HP products for the last 20 years, but that is about to change.  I recently had an issuewith the sound or lack of it on my PC. I could get sound from CD's but not the interne

  • Primitive data type casting

    Hi.. when I run the following prg, It is throwing exception at line 6.But it is compiling well with line 5. what make difference here.Why cant we do same with long. public class Tester {      public static void main(String[] args) { final int i=10; f

  • Commitment Item for one deleted PO item

    Hi Expert, For one PO item for WBS, we have deleted it. but we don't understand why the commitment item is still here, can be seen from CJI5. How can we delete this commitment ? The PO is intercompany transfer PO. No PR existed. Thanks and Regards Sh