UDP Single Socket, Two Ports

Hi,
I am currently building software for an antenna testing pedestal. I am trying to receive information and send commands through a program for the ACU.  The LabVIEW program is supposed to receive information through a slave port by parsing bytes from the received information, and send a new command back.
I am having trouble with the transmission portion.  Because of the limitation of the software, if I try to open a socket for both the receive and transmission ports, I get an error saying that the port is already in use.  I have come to a conclusion(please tell me if this is correct) that I will need to use a single socket, but use two ports on the same socket.  Is this possible? If so, how can I do this?
If this is not possible, how can I work around this?
I have attached the receive/transmit portion of my test program.
Thank you,
Aki
LabVIEW 2011 SP1 Version 11.0.1f1
Windows XP Professional  Version 2002 SP3
Attachments:
Compact Range UDP.vi ‏22 KB

First, please take some time to learn how to use data flow and program correctly in LabVIEW. Your program is very typical of someone coming from a text programming background and trying to make LabVIEW look like that. For instance, in one frame (of your many frame structures) you have four copies of the same local variable. Simply branch the wire. Your parallel frame structures will not operate independently. Each must complete a full cycle before you can move on to the next loop iteration. Speaking of frame structures, please do not use stacked frames. Take some time to learn how to use state machines. They are much more flexible. However, most of your code could be written using simple dataflow.
With respect to your UDP question, I assume based on your code that you are connecting to the remote device which is acting like a server. If this is the case you can both read and write over that same connection. (UDP does not actually have connections but when you open a UDP session it can be considered a connection.) Unless you are using different ports, which you are not since you are getting the error, you only need a single UDP open. The reference out of that can be used for both sending anf receiving data.
Mark Yedinak
"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot

Similar Messages

  • I have to send messages through UDP multicast and unicast from same port. In Labview I tried that it throws error. I heard it is possible by means of Datagram (UDP unicast and multicast) Port Sharing. How can it be achieved in Labview?

    I have to send UDP multicast and Unicast messages to a remote port from a single source/local port. I tried by opening UDP unicast and multicast in the same port and got the expected error. I tried by opening a unicast connection and sending unicast messages.After that when multicast messages has to send I closed unicast and opened multicast in the same port.This is not throwing any error. But my requirenment is to comminicate with another application in C ++ which recieves this data, throwing an error of lost connectivity and both the applications are not abled to communicate properly. 
    In the other application with C++ this is implemented using port sharing. So how port sharing can be implemented in labview so that I can send both multicast and unicast messages from the same port?
    Thanks in advance

    UDP is a sessionless protocol, meaning that anyone listening on the specified port CAN receive the data. CAN because as you noted there is no guarantee in the protocol that it will be received. And if you send the data not to a specific address but a multicast address not only one computer can receive it but in fact every computer on the same subnet listening to that multicast address and depending on the TTL of the packet also computers in neighbouring subnets, although that last one is not a very reliable operation since routers can be configured to drop multicast packages anyhow despite of a different TTL saying otherwise.
    Accordingly there is no real way to make sure that a receiving UDP port is not already in use, since you don't build up a connection. UDP is more or less analogous to shouting your messages through a megaphone, and anyone listening on the right frequency (port) can hear it. You do bind the sender socket to a specific port number but that makes little difference.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Multiple connections on a single socket simultaneously

    Hey everybody,
    Can a single socket on a client establish connections with different ports on a server at the same time?? I am awaiting for your replies.
    Thanks,
    Mani.

    No.

  • Daisy chaining external hard drives and a video camera from a single firewire 800 port on my imac

    I have only a single firewire 800 port on my imac and want to know if I can daisy chain two external hard drives and my video camera, please? If not is there another solution using USB 2?

    Are the external HDs self powered or powered by the FW port?  If they are self powered there should not be a problem. If they are port powered they may put a strain on the port's power output but I'n not positive on that. 

  • Can i run UDP  client and UDP  server socket program in the same pc ?

    hi all.
    when i execute my UDP client socket program and UDP server socket program in the same pc ,
    It's will shown the error msg :
    "Address already in use: Cannot bind"
    but if i run UDP client socket program in the remote pc and UDP server socket program run in local pc , it's will success.
    anybody know what's going on ?
    any help will be appreciated !

    bobby92 wrote:
    i have use a specified port for UDP server side , and for client define the server port "DatagramSocket clientSocket= new DatagramSocket(Server_PORT);"Why? The port you provide here is not the target port. It's the local port you listen on. That's only necessary when you want other hosts to connect to you (i.e. when you're acting as a server).
    The server should be using that constructor, the client should not be specifying a port.
    so when i start the udp server code to listen in local pc , then when i start UDP client code in local pc ,i will get the error "Address already in use: Cannot bind"Because your client tries to bind to the same port that the server already bound to.

  • IP SLA UDP-ECHO socket error

    have this configuration on ASR1002F router. Trying to setup IP Sla so that we can monitor the delay on WAN interfaces. Would like to send UDP-ECHO from one router to another across the WAN.   I need to send and receive on fixed port numbers. Keep getting socket errors.  any ideas on what i need to do?
    no ip sla 5
    ip sla 5
    udp-echo <dest ip> 65000 source-port 65000 control disable
    frequency 5
    ip sla schedule 5 life forever start-time now
    exit

    Was there a "source-ip xx.xx.xx.xx" portion on the "udp-echo 65000 source-port 65000 control disable" line?

  • How can I use two ports in the same time?

    My application need one pc use two ports the same time.But when I open one port and my systerm is running the other port can't be opened.
    I use the frame API in VC++6.0.
    My OS is win2000 server;
    The functions I used are ncOpenObject();

    Hi DickW
    Thank you for your help!
    I have tried the example.But the example shows how to connect one CAN network with two ports.
    I want each port connect to the net can both read and write;
    I want to apply the function like this:
    1.config the port1 and port2
    2,open port1 and port2
    But after I open port1 or port2 the other port can't be opened;
    After I open the second port it always returns negative.
    In the codes I use CAN0 and CAN1 as the CAN objects.
    Attachments:
    twoport.zip ‏1184 KB

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

  • Running Toolkit - Cannot connect socket to port

    Hi,
    Can anybody help me to try and execute any program with the J2ME Toolkit. After loading the jad file from the samples I get the following error. This happens irrespective of the application I try and the applications do run on the Nokia toolkit I have installed. The error is as follows:
    Running with storage root DefaultColorPhone
    Cannot connect socket to port 3279
    Windows error code 10061
    Cannot open socket for LIME events on port 3279
    I am running Windows XP Pro, JSDK1.4.2.
    Thanks for your help.
    Sean Mac

    when i run the j2me toolkit 21 get the following message and the device disapears after a second...
    cannot connect socket to port 1047
    Windows error code 10061
    cannot open socket for LIME events on port 1047
    plzzz reply

  • Can't open HTTP server socket on port 50000 in dispatcher

    We get the following message in the console_log for the dispatcher.
    ID000544: Error starting service http. Can't start the service due to java.io.IO
    Exception: Can't open HTTP server socket on port 50000
    [ServiceManager]: ID000544: Error starting service http. Can't start the service
    due to java.io.IOException: Can't open HTTP server socket on port 50000
    [Framework -> criticalShutdown] Service http startup error!
    Anyone have any ideas what might be the problem?
    Thanks,
    Keith

    Hello Keith,
    this errors occurs when the port http 50000 is already taken. Please could you check if this port on your machine is free or an other dispacther instance is already started on same machine. You can change the port in sap j2ee config tool (dispatcher-> services->http)
    Best Regards,
    Fabrice

  • Using new Socket( host, port );

    how long does it take for a client to connect to the server.. How long does
    socket = new Socket( host port);
    take?
    I ask because if it takes longer on some computers, my clients wont connect in the correct order..
    Example:
    Client1 is sent to the server then
    Client2 is sent to the server then
    Client3 is sent to the server..
    Client1 takes 4 seconds to connect..
    Client2 takes 1 second!
    Client3 takes 1 second.
    In this case client's 2 and 3 with get in before client1 but I want them to connect in the correct order? Do I need to worry about new Socket( host, port ) load times or are they negligible?

    How long it takes depends on a lot of things - for example, on the network traffic. It's in general impossible to predict.
    Why does your program require that the clients connect in a certain order?
    If you really have to make sure that clients connect in a certain order, then you'll have to invent a mechanism to insure this yourself. For example, first tell client 1 to connect and wait for the connection to be established, then tell client 2 to connect and wait, etc.

  • Do we need two ports for establishing one connection to EJB from swing clie

    Hi all,
    I have an application which uses Java Swing client and accesses an EJB to connect to the server.
    I am connecting to the EJB using iiop://server-ipaddress:port.
    It is required for me to open the firewall to access the above specified ip address and port number. Even though, I am able to access the specific ip address and port number, I am not able to establish the connection.
    I tried out to check the porblem and I came to know that, this aplication is trying to open another port also on the same IP address.
    I am just wondering whether we need two ports for one connection.
    Does anybody face this type of problem?

    If you need to access on two ports, you would have to open both :)

  • SAS MPIO Driver Server 2012 HCT Fails with "make sure two ports are connected" error even with two ports connect

    We are running the Server 2012 HCT against a SAS MPIO driver for a server platform with dual redundant storage controllers.  The test fails with this error:
    (x) For non-iSCSI test environment, please make sure at least two HBA ports are connected to the storage target.
    File=testsrc\driverstest\storage\wdk\mpiotest\logotest\devicelib\mpiodevice.cpp Line=2772
    Error: 0x0, Error 0x00000000
    The system does have two ports connected so the cause of the error is unclear to us.  We do not have any problems when running the 2008R2 HCT.  Are there any known issues or fixed or workarounds for this problem?

    Sorry, maybe I should say WLK rather than HCT.  We are trying to submit the SAS MPIO driver for WHQL signing.
    Here is a sample MPIO snapshot where you can see our driver is controlling five drives each with two paths.
    MPIO Storage Snapshot on Wednesday, 17 April 2013, at 18:31:40.275
    Registered DSMs: 2
    ================
    +--------------------------------|-------------------|----|----|----|---|-----+
    |DSM Name                        |      Version      |PRP | RC | RI |PVP| PVE |
    |--------------------------------|-------------------|----|----|----|---|-----|
    |Microsoft DSM                   |006.0002.09200.16384|0120|0003|0001|030| True|
    |Intel(R) Storage Controller MPIO|004.0001.00140.0002|0120|0003|0001|030| True|
    +--------------------------------|-------------------|----|----|----|---|-----+
    Microsoft DSM
    =============
    No devices controlled by this DSM at this time!
    Intel(R) Storage Controller MPIO Driver
    =======================================
    MPIO Disk4: 02 Paths, Fail Over Only, Explicit Only
            SN: 2263015539BAB                                                   
            Supported Load Balance Policies: FOO RR RRWS LQD
        Path ID          State              SCSI Address      Weight
        0000000077000001 Standby            000|000|001|004   0
            TPG_State: Standby           , TPG_Id: 1, TP_Id: 6
            Adapter: LSI Adapter, SAS 3000 series, 4-port ...  (B|D|F: 004|000|000)
            Controller: EBF4115500000000         (State: No Controller)
        0000000077000000 Active/Optimized   000|000|000|004   0
          * TPG_State: Active/Optimized  , TPG_Id: 0, TP_Id: 3
            Adapter: LSI Adapter, SAS 3000 series, 4-port ...  (B|D|F: 004|000|000)
            Controller: D1FBD25300000000         (State: No Controller)
    MPIO Disk3: 02 Paths, Fail Over Only, Explicit Only
            SN: 22201556966AB                                                   
            Supported Load Balance Policies: FOO RR RRWS LQD
        Path ID          State              SCSI Address      Weight
        0000000077000001 Active/Optimized   000|000|001|003   0
          * TPG_State: Active/Optimized  , TPG_Id: 1, TP_Id: 6
            Adapter: LSI Adapter, SAS 3000 series, 4-port ...  (B|D|F: 004|000|000)
            Controller: EBF4115500000000         (State: No Controller)
        0000000077000000 Standby            000|000|000|003   0
            TPG_State: Standby           , TPG_Id: 0, TP_Id: 3
            Adapter: LSI Adapter, SAS 3000 series, 4-port ...  (B|D|F: 004|000|000)
            Controller: D1FBD25300000000         (State: No Controller)
    MPIO Disk2: 02 Paths, Fail Over Only, Explicit Only
            SN: 226E01556E6C5F                                                  
            Supported Load Balance Policies: FOO RR RRWS LQD
        Path ID          State              SCSI Address      Weight
        0000000077000001 Active/Optimized   000|000|001|002   0
          * TPG_State: Active/Optimized  , TPG_Id: 1, TP_Id: 6
            Adapter: LSI Adapter, SAS 3000 series, 4-port ...  (B|D|F: 004|000|000)
            Controller: EBF4115500000000         (State: No Controller)
        0000000077000000 Standby            000|000|000|002   0
            TPG_State: Standby           , TPG_Id: 0, TP_Id: 3
            Adapter: LSI Adapter, SAS 3000 series, 4-port ...  (B|D|F: 004|000|000)
            Controller: D1FBD25300000000         (State: No Controller)
    MPIO Disk1: 02 Paths, Fail Over Only, Explicit Only
            SN: 227C01558F689E                                                  
            Supported Load Balance Policies: FOO RR RRWS LQD
        Path ID          State              SCSI Address      Weight
        0000000077000001 Standby            000|000|001|001   0
            TPG_State: Standby           , TPG_Id: 1, TP_Id: 6
            Adapter: LSI Adapter, SAS 3000 series, 4-port ...  (B|D|F: 004|000|000)
            Controller: D1FBD25300000000         (State: No Controller)
        0000000077000000 Active/Optimized   000|000|000|001   0
          * TPG_State: Active/Optimized  , TPG_Id: 0, TP_Id: 3
            Adapter: LSI Adapter, SAS 3000 series, 4-port ...  (B|D|F: 004|000|000)
            Controller: 6E9AD05300000000         (State: No Controller)
    MPIO Disk0: 02 Paths, Fail Over Only, Explicit Only
            SN: 22F10155FB941D                                                  
            Supported Load Balance Policies: FOO RR RRWS LQD
        Path ID          State              SCSI Address      Weight
        0000000077000001 Standby            000|000|001|000   0
            TPG_State: Standby           , TPG_Id: 1, TP_Id: 6
            Adapter: LSI Adapter, SAS 3000 series, 4-port ...  (B|D|F: 004|000|000)
            Controller: D1FBD25300000000         (State: No Controller)
        0000000077000000 Active/Optimized   000|000|000|000   0
          * TPG_State: Active/Optimized  , TPG_Id: 0, TP_Id: 3
            Adapter: LSI Adapter, SAS 3000 series, 4-port ...  (B|D|F: 004|000|000)
            Controller: 6E9AD05300000000         (State: No Controller)
    MSDSM-wide default load balance policy: N\A
    No target-level default load balance policies have been set.
    ================================================================================

  • Two port bootable SATA PCIe internal Host adapter

    Hi
    My first post.
    Who make a Two port bootable SATA PCIe internal Host adapter.
    What I would like to do is add two Intel 80GB SSD's in the open optical bay and set them up as Raid 0 for booting and applications. Is this even possible??
    Other info:
    Bay 1 scratch disk. Bay 2, 3, and 4 are set up with 3 WD RE3 in a Raid 0 for data. For booting I am using a Guardian MAXimus RAID-1 [MIRROR] External eSATA/FireWire 800.
    And yes I have back up systems. LaCie 5big Network, Time Machine 2TB and a Seagate free agent. Paranoid Yes, I have lost stuff.....
    Message was edited by: fxdxt

    Cool. Welcome to the Apple Discussions. You should like it here, for nothing else but the diversity of opinion.
    In my case, if I were you, I'd get one of these, and put your two Intel's in the optical bay. Native and bootable... Eh, Voila!
    http://eshop.macsales.com/item/Other%20World%20Computing/MRSFW8U2OB/
    Wait a minute, I did do that...

  • I need a firewire with two ports hdmi and network does that exist?

    I am looking to use my Mac AIr in presentations. I want to switch bewtween showing a presentation on Powerpoint and then show some equipment GUI's on my desktop. Is there a Firewire cable that has two ports or inputs? Is there another way to do this?

    Welcome to Apple Discussions
    Will you be using a video projector of some sort? If so it would connect via the Video Out port on the MBP (no FireWire involved at all) to the video in port on the projector - you may need an adaptor & video cable for that.
    Once you exit or minimize the PPT your desktop would be displayed on the projector... no extra cables required at all.

Maybe you are looking for

  • Touch Screen unresponsive after iOS 8 update

    My 1 year old 64GB iPhone 5 touch screen started to become unresponsive after iOS 8 update It's not consistent. Touch screen functionality will seize whilst phone is being used for either answering calls, typing messges, surfing, gaming etc and won't

  • How to get return value from Java runtime.getRuntime.exec?

    I'm running shell commands from an Oracle db (11gr2) on aix. But, I would like to get a return value from a shell comand... like you get with "echo $?" I use a code like CREATE OR REPLACE JAVA SOURCE NAMED common."Host" AS import java.io.*; public cl

  • SAP MII 14.0 unable to open workbench

    Hello Experts, I am facing issue while opening workbench . The exception thrown is as below : "com.sun.deploy.net.JARSigningException: Found unsigned entry in resource: http://[sever]:[port]/XMII/CMSLogicEditor/xalan.jar" I am using SAP MII 14.0 SP5

  • Populating the configurator !!

    HI All We have a requirement of Referencing the current product configuration from the Install Base and then populating it in Oracle Configurature , If any feature code is not populated due to any reason ,then we need to show those reason in the repo

  • 'Error occured while converting the file--unknown error occured 0x77686174

    I just got my first iPod but I'm a little frustrated. I put in a cd, iTunes opens and asks me if I want to import the songs, I reply yes. When it tries the very first song of the cd, it immediately comes up with 'Error occured while converting the fi