Does anyone have an example of a c++ TCP/IP client that works with labview TCP?IP server ??

I have the labview TCP/IP client/server working fine, but now I need to do this were labview is the TCP/IP server and the c++ program is the client. Does anybody have a simple C++ TCP/IP client that works with labview TCP/IP server ????

Thanks, you were right, we modified the c++ program to include the port # in the IP address and it worked.We also forgot to convert the port #. I included my labview and c++ program.
Attachments:
TCP-IP.llb ‏47 KB
client.exe ‏40 KB

Similar Messages

  • Does anyone have an example VI about how to call the animatewindow function in the user32.dll using CLN in Labview?

      I want to call the WinAPI function-animatewindow in user32.dll to produce some special effect when showing or hidding windows, but i don't know how to using this Win API to achieve my purpose?
      Does anyone have an example VI about this application?
      Thanks in advance for your help.

    You have to use the Call Library Function Node to call Windows API functions. The animatewindow function itself has some pretty simple parameters. You first need to get the window handle. There are a set of Windows API Function Utilities (32-bit) for LabVIEW that you can use. In there there is a VI (Get Window Refnum) that gets the window handle. It's a simple call to a Windows API function. You would call the animatewindow function in the same way. In this case there are 3 parameters: the window handle (returned by a FindWindow API call), a DWORD (32-bit integer) for the duration, and another DWORD for the flags.

  • Does anyone have an example code to use mx:ViewStack with my application.

    Does anyone have an example code to use <mx:ViewStack>
    with my application.
    I don't know about how to put value to it and use value in
    it.

    http://livedocs.adobe.com/flex/2/langref/mx/containers/ViewStack.html#includeExamplesSumma ry
    That should be what you're looking for.

  • Anyone have an example of a PCI-6250 Digital and Analog Aquistion with Analog Post-Trigger?

    Hey All,
    We're trying to set up a post trigger data capture of parallel absolute strobed Gurley 17-bit encoder data (ignoring MSB for 16-bit aquisition) with an analog signal that is the output of a torque load cell.  The trick is to use the analog signal level as a post-trigger to stop the data aquisition.
    1) can the analog signal be recorded and used as the trigger?
    2) does anyone have an example using the PCI-6250 (or 6251)
    Thanks in advance for your help,
    -Drewksi 

    Hi Drewski,
    You can use the APFI0 line as an analog trigger for your signal. However, in this case you need to connect your analog signal to both the analog channel you want to acquire at and the APFI0 line.
    Assuming you are using LabVIEW,you can check the "Acq&Graph Voltage-Ext Clk-Analog reference.vi" example. This examples uses an external clock but it works also with the internal clock. All you have to do to change the control to onboard clock.
    You can find this example in LabVIEW Help >> Find Examples >> Hardware Input and Output >> DAQmx >> Analog Measurement >> Voltage
    Best Regards,
    Faris
    Bueller

  • Does apple offer discounts to therpists at a non-profit organization that works with mental health patients?

    Does apple offer discounts to therapists at  non-profit organization that work with mental health patients?

    If you're asking about an iPad, to the best of my knowledge Apple does not offer discounts on the iPad to anyone, nonprofit or not. For other Apple products, contact your organization's HR or Benefits department and ask about employee discounts. If they have arranged such a program with Apple, your benefits coordinator would most likely to be the one to know about it. Otherwise, no, they do not.
    Regards.

  • Does anyone have an example to share of using a variable in a proc call?

    I would like to use a value from a table to call a procedure in ActionScript. Can anyone share an example with me? TIA,
    Deb.
    (For example
      var proc_name_from_table:String;
       var command_proc:String;
      command_proc="mx.core.FlexGlobals.TopLevelApplication." + proc_name_from_table;
      command;
    Or something like that (just to give you an idea where I am heading).
    It is for a site map application that gets values from a table and I don't want to write a huge if statement with specific, hard-coded calls.)

    You have to use the Call Library Function Node to call Windows API functions. The animatewindow function itself has some pretty simple parameters. You first need to get the window handle. There are a set of Windows API Function Utilities (32-bit) for LabVIEW that you can use. In there there is a VI (Get Window Refnum) that gets the window handle. It's a simple call to a Windows API function. You would call the animatewindow function in the same way. In this case there are 3 parameters: the window handle (returned by a FindWindow API call), a DWORD (32-bit integer) for the duration, and another DWORD for the flags.

  • Does anyone have an example of taking a string and encrypting it and vise v

    I want to encrpyt -> save in my database
    then
    get value from database --> and then unencrypt
    Thanks for your time
    Adam

    You could look into a Base64 encoding scheme:
    //////////////////////license & copyright header/////////////////////////
    // Base64 - encode/decode data using the Base64 encoding scheme //
    // Copyright (c) 1998 by Kevin Kelley //
    // This library is free software; you can redistribute it and/or //
    // modify it under the terms of the GNU Lesser General Public //
    // License as published by the Free Software Foundation; either //
    // version 2.1 of the License, or (at your option) any later version. //
    // This library is distributed in the hope that it will be useful, //
    // but WITHOUT ANY WARRANTY; without even the implied warranty of //
    // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
    // GNU Lesser General Public License for more details. //
    // You should have received a copy of the GNU Lesser General Public //
    // License along with this library; if not, write to the Free Software //
    // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA //
    // 02111-1307, USA, or contact the author: //
    // Kevin Kelley <[email protected]> - 30718 Rd. 28, La Junta, CO, //
    // 81050 USA. //
    ////////////////////end license & copyright header///////////////////////
    import java.io.*; // needed only for main() method.
    * Provides encoding of raw bytes to base64-encoded characters, and
    * decoding of base64 characters to raw bytes.
    * @author Kevin Kelley ([email protected])
    * @version 1.3
    * @date 06 August 1998
    * @modified 14 February 2000
    * @modified 22 September 2000
    public class Base64 {
    * returns an array of base64-encoded characters to represent the
    * passed data array.
    * @param data the array of bytes to encode
    * @return base64-coded character array.
    static public char[] encode(byte[] data)
    char[] out = new char[((data.length + 2) / 3) * 4];
    // 3 bytes encode to 4 chars. Output is always an even
    // multiple of 4 characters.
    for (int i=0, index=0; i<data.length; i+=3, index+=4) {
    boolean quad = false;
    boolean trip = false;
    int val = (0xFF & (int) data);
    val <<= 8;
    if ((i+1) < data.length) {
    val |= (0xFF & (int) data[i+1]);
    trip = true;
    val <<= 8;
    if ((i+2) < data.length) {
    val |= (0xFF & (int) data[i+2]);
    quad = true;
    out[index+3] = alphabet[(quad? (val & 0x3F): 64)];
    val >>= 6;
    out[index+2] = alphabet[(trip? (val & 0x3F): 64)];
    val >>= 6;
    out[index+1] = alphabet[val & 0x3F];
    val >>= 6;
    out[index+0] = alphabet[val & 0x3F];
    return out;
    * Decodes a BASE-64 encoded stream to recover the original
    * data. White space before and after will be trimmed away,
    * but no other manipulation of the input will be performed.
    * As of version 1.2 this method will properly handle input
    * containing junk characters (newlines and the like) rather
    * than throwing an error. It does this by pre-parsing the
    * input and generating from that a count of VALID input
    * characters.
    static public byte[] decode(char[] data)
    // as our input could contain non-BASE64 data (newlines,
    // whitespace of any sort, whatever) we must first adjust
    // our count of USABLE data so that...
    // (a) we don't misallocate the output array, and
    // (b) think that we miscalculated our data length
    // just because of extraneous throw-away junk
    int tempLen = data.length;
    for( int ix=0; ix<data.length; ix++ )
    if( (data[ix] > 255) || codes[ data[ix] ] < 0 )
    --tempLen;  // ignore non-valid chars and padding
    // calculate required length:
    // -- 3 bytes for every 4 valid base64 chars
    // -- plus 2 bytes if there are 3 extra base64 chars,
    // or plus 1 byte if there are 2 extra.
    int len = (tempLen / 4) * 3;
    if ((tempLen % 4) == 3) len += 2;
    if ((tempLen % 4) == 2) len += 1;
    byte[] out = new byte[len];
    int shift = 0; // # of excess bits stored in accum
    int accum = 0; // excess bits
    int index = 0;
    // we now go through the entire array (NOT using the 'tempLen' value)
    for (int ix=0; ix<data.length; ix++)
    int value = (data[ix]>255)? -1: codes[ data[ix] ];
    if ( value >= 0 ) // skip over non-code
    accum <<= 6; // bits shift up by 6 each time thru
    shift += 6; // loop, with new bits being put in
    accum |= value; // at the bottom.
    if ( shift >= 8 ) // whenever there are 8 or more shifted in,
    shift -= 8; // write them out (from the top, leaving any
    out[index++] = // excess at the bottom for next iteration.
    (byte) ((accum >> shift) & 0xff);
    // we will also have skipped processing a padding null byte ('=') here;
    // these are used ONLY for padding to an even length and do not legally
    // occur as encoded data. for this reason we can ignore the fact that
    // no index++ operation occurs in that special case: the out[] array is
    // initialized to all-zero bytes to start with and that works to our
    // advantage in this combination.
    // if there is STILL something wrong we just have to throw up now!
    if( index != out.length)
    throw new Error("Miscalculated data length (wrote " + index + "instead of " + out.length + ")");
    return out;
    // code characters for values 0..63
    static private char[] alphabet =
    "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
    .toCharArray();
    // lookup table for converting base64 characters to value in range 0..63
    static private byte[] codes = new byte[256];
    static {
    for (int i=0; i<256; i++) codes[i] = -1;
    for (int i = 'A'; i <= 'Z'; i++) codes[i] = (byte)( i - 'A');
    for (int i = 'a'; i <= 'z'; i++) codes[i] = (byte)(26 + i - 'a');
    for (int i = '0'; i <= '9'; i++) codes[i] = (byte)(52 + i - '0');
    codes['+'] = 62;
    codes['/'] = 63;
    // remainder (main method and helper functions) is
    // for testing purposes only, feel free to clip it.
    public static void main(String[] args)
    boolean decode = false;
    if (args.length == 0) {
    System.out.println("usage: java Base64 [-d[ecode]] filename");
    System.exit(0);
    for (int i=0; i<args.length; i++) {
    if ("-decode".equalsIgnoreCase(args[i])) decode = true;
    else if ("-d".equalsIgnoreCase(args[i])) decode = true;
    String filename = args[args.length-1];
    File file = new File(filename);
    if (!file.exists()) {
    System.out.println("Error: file '" + filename + "' doesn't exist!");
    System.exit(0);
    if (decode)
    char[] encoded = readChars(file);
    byte[] decoded = decode(encoded);
    writeBytes(file, decoded);
    else
    byte[] decoded = readBytes(file);
    char[] encoded = encode(decoded);
    writeChars(file, encoded);
    private static byte[] readBytes(File file)
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    try
    InputStream fis = new FileInputStream(file);
    InputStream is = new BufferedInputStream(fis);
    int count = 0;
    byte[] buf = new byte[16384];
    while ((count=is.read(buf)) != -1) {
    if (count > 0) baos.write(buf, 0, count);
    is.close();
    catch (Exception e) { e.printStackTrace(); }
    return baos.toByteArray();
    private static char[] readChars(File file)
    CharArrayWriter caw = new CharArrayWriter();
    try
    Reader fr = new FileReader(file);
    Reader in = new BufferedReader(fr);
    int count = 0;
    char[] buf = new char[16384];
    while ((count=in.read(buf)) != -1) {
    if (count > 0) caw.write(buf, 0, count);
    in.close();
    catch (Exception e) { e.printStackTrace(); }
    return caw.toCharArray();
    private static void writeBytes(File file, byte[] data) {
    try {
    OutputStream fos = new FileOutputStream(file);
    OutputStream os = new BufferedOutputStream(fos);
    os.write(data);
    os.close();
    catch (Exception e) { e.printStackTrace(); }
    private static void writeChars(File file, char[] data) {
    try {
    Writer fos = new FileWriter(file);
    Writer os = new BufferedWriter(fos);
    os.write(data);
    os.close();
    catch (Exception e) { e.printStackTrace(); }
    // end of test code.

  • Does anyone have Experience talking to a WAGO Ethernet Fieldbus copler using the Open modbus/TCP protocol and LabView ?

    I have an Ethernet Fieldbus Copler of WAGO which supports the OpenModbus/TCP Protocoll, and I want to talk to it over LabView. Does anyone know how to do this or even has example VI's or Librarys ?

    Wago and National Instruments have worked together to test and develop an application note showing the use of the National Instruments Modbus driver with LabVIEW and the Wago Ethernet Coupler. I have attached the preliminary applications note (which is in final technical review here at NI). You can purchase the National Instruments Modbus driver by ordering the Industrial Automation Servers, part 777616-01. The USA price is $995. It should save you quite a bit of time in working with the Wago device and any other industrial controller or modbus device you might work with in the future.
    Preston Johnson
    Business Development Manager
    Preston Johnson
    Principal Sales Engineer
    Condition Monitoring Systems
    Vibration Analyst III - www.vibinst.org, www.mobiusinstitute.com
    National Instruments
    [email protected]
    www.ni.com/mcm
    www.ni.com/soundandvibration
    www.ni.com/biganalogdata
    512-683-5444
    Attachments:
    wago_overview.doc ‏171 KB

  • So does anyone have any info on if apple know about all the problems with the iTunes update?

    By problems I mean:
    . The unability to sync music from your laptop/computer to your apple device
    . The slowness
    . Unable to log in
    . Being told that the laptop/computer being used isn't recognised
    . Clicking on music and it flicking through really quick without playing and then not playing after, but still being on apple device.
    + all the other problems i've seen mentioned on this page. It's pretty clear the new updates have glitches that urgently need fixing and a lot of people are encountering some or multiple of these problems.
    I've not seen or heard any announcement whether they know or not or if they're doing something to fix this, because they need to. Urgently.

    Hi JamilMereck,
    first of: you can edit previous posts in a time-frame of some minutes (haven't measured it ...).
    After that they become non-editable.
    I admit I have used microphones some years back with and without PCs (have switched to Macs 2.5 years ago).
    But I always had the mics connected to a mixing desk, which provided Phantom Power.
    Since I gave up my 'Singing Career' (wasn't good enough) I also abandoned the use of microphones.
    To your questions:
    It might be that PCs with specified Microphone-In ports are also providing power to them or the microphones themselves do not need any power.
    And the 'compatible with...' refers to the usage on computers in general.
    The iMic from Griffin works with OSX 10.5 (scroll down on the webpage to 'Product Compatibility' the left icon symbolizes OSX 10.5).
    As said above, I am no longer up-to-date in usage of microphones, but when you want to use a microphone with the standard connector you have to get either a microphone preamp or a mixer.
    If you use the mic only (really only) with your Mac Pro, you might wanna look for USB-connected mics from Samson or Audio Technica for example.
    And don't get upset, I understand you fully and any kind of 'insult' is for the manufacturers and not for me
    Stefan

  • Does anyone have any idea how do i key in number that contains 20digit, 17 decimal places?

    I need to key in a number that contains at least 17 decimal places using numeric digit control and i need to use expression note as well. Can anyone help?

    After laying down a numeric control right click on it and select "Format and Precision..." to change the number of decimal places. You can also right click and change the "Representation" of the numeric control. By default it will be a DBL which is a 64 bit decimal number with an approximate range of 10**(-308) to 10**308. This is about 15 decimal digits of precision. I know SGL will only give you 10**(-38)to 10**38, which is about 7 decimal digits of precision. Neither of these will cut it for what you are trying to do.
    I would recommend using the Extended Precision (EXT) representation. According to the linked document La
    bVIEW's implementation of the Extended Precision follows the IEEE 80-bit spec(on Windows OSes). Supposedly even the IEEE 128-bit spec(not implemented on the Windows OSes)only gets you 19 decimal places but I am not sure what the limitations of LabVIEW's implementation are. (I found a good table in the LabVIEW help title, "Numeric Data Types Table".)
    I was able to successfully get 17 digits after the decimal point but that was with a leading 0 only before the decimal point. I think you may just be approaching the limit of how a number can be represented in this programming language.
    Anyone else?
    -scraggs99

  • I need a fast buffer which is resizable! Does anyone have an Example how to do that?

    If I use shift registers, I have to say how many elements I want.
    I could use an Array and a local variable and resize the Array all the time, but that is somehow not such a good idea.
    Can Anybody help
    Thank You

    As nobody had an answer I tried something out myself (see atached example). It is a dynamically resizable Buffer not using locals. I also used information of the example FIFO_WO_LocalVar2_6i.vi. Thanks!
    Attachments:
    buffer_rs.vi ‏24 KB

  • Does anyone have an example of an InDesign screenshot on retina Mac?

    I would like to know what InDesign looks like on a retina Mac. Unfortunately I do not live anywhere near a retailer who sells Macs.

    You might want to wait until Adobe updates their product.
    Why don't you ask this question on the Adobe forums instead?
    Other factors you need to consider is now Apple is on a annual OS X upgrade cycle and the future of what OS X will look like is certainly in question as 10.7 and 10.8 introduced a LOT of radical changes, features like Save As...Spaces, scroll bars...removed etc. etc.
    OS X is currently in a state of flux, we don't know why they are doing this, assuming it's new hardware coming of a touchscreen nature for consumers, but it's creating problems for the Mac pro segment who need stability.
    You might want to look at a Windows 7 tower with a nice UltraSharp display, Windows 7 will be supported just like it is with no changes until 2020, that's 8 years verses annual third party software upgrades (paid) and no possible hardware driver upgrades for expensive third party equiptment.
    With Apple on a tear to change OS X and hardware, we don't have a clue what's coming, it's been rather unsettling for the pro market all the way from the Final Cut Pro X debacle to graphic designers who can't afford to replace all their software/hardware so frequently to those who have PPC based apps they require or have lots of file in, and the developers decided to bail since Apple is signaling a closed hardware like on iPads with 10.7+'s AppStore (30% cut to Apple) etc.
    Apple doesn't sell new hardware with a older operating system, we get people here all the time wanting to install Snow Leopard on their new machines and they can't, so we send them to a hack to try to run it in a virtual machine in desperation attempt.
    Apple is a consumer products company where they make most of their revenue at and many professional users are reconsidering their options now due to all the rapid  chaos and changes.
    http://arstechnica.com/apple/2012/01/video-pros-apple-needs-to-acknowledge-the-p ro-industry-and-fast/

  • Does anyone have time for this one? photoshop 2014 gradient not working.

    Working on a project with photoshop 2014 updated thursday night using foreground to transparent gradient. The edges of the picture are staying white instead of being transparent over the background or other pictures. I thought I was using the gradient correctly converting the pic to a png file, setting the mask, then applying the gradient to the edges. Is there something I am missing??? Please help.

    below is a snip of the effect i am looking for. i remember it working in the trial version late 2013 photoshop. it was so simple i thought it would be hard to forget how, but i must be missing something. i looked, clicked and checked all around the work space to find a way to change from "background layer" and did not find it. the trial version (lets call it "trial period" because its all the same except paid for now along with updated to ps 2014) did also have the layer change in an easy to find way. i believe it was double click or right click over the currently active layer in the list as in the lower snip pic.
    the pic above did work during my trial period so i know it works somehow. i dont know what i am missing now. right click or double click now does not bring up the layer type selection in the menu like you suggested to change from backgroung layer. also every new picture file i open makes its own new layer. when i make a new layer i havent figured out how to put a pic in it. if you could show me how to create this effect or find my missing step that would be awsome.

  • Hello, my iPad's power button has stopped working. Does anyone have a solution as to how I can make it work again

    Please help. My iPads power button has stopped working. I cannot take it to sleep mode or switch it off

    Try a reset even though the Sleep/Wake button is not woring.
    Hold down the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears
    Note: Data will not be affected.

  • My mac does not have airplay mirroring. How can I get it to work with my apple tv

    My Mac doesnt not have airplay and I have apple TV.

    You have to have Mountain Lion and a qualifying mac:
    AirPlay Mirroring
    Requires a second-generation Apple TV or later. Supports the following Mac models:
    iMac (Mid 2011 or newer)
    Mac mini (Mid 2011 or newer)
    MacBook Air (Mid 2011 or newer)
    MacBook Pro (Early 2011 or newer)
    http://www.apple.com/osx/specs/

Maybe you are looking for

  • Entro em Roam e meu iPhone perde sinal da operadora

    Pessoal, Preciso de ajuda. Tenho um iPhone 4 com o sistema operacional IOS 5.0.1 desbloqueado para a operadora OI. Toda a vez que viajo e entro em outro estado o iPhone perde o sinal da operadora e não retoma. Ja tentei de tudo (reset; reinstalação;

  • Issue at 8D report

    Hi 8D Analysis report for Customer complaints defect. when I create 8D report for Customer notification Report is Picking values from Notification - Referance, Defect description, and Defect cause but not the other fields( others are empty) Actually

  • Merging files in BPM using correlation

    Hi all, I am dng a file merging senario using BPM.Please let me knw any blogs or some help in dng the same. Rgds Aditya

  • Importing XML data into sys.XMLType  - encoding problem

    Hi, I'm using "modplsql Gateway" to upload XML file with encoding "windows-1250" with some regional characters in database table. The table definition: CREATE TABLE NAHRAJ_DATA ( NAME VARCHAR(128) UNIQUE NOT NULL, MIME_TYPE VARCHAR(128), DOC_SIZE NUM

  • Java Database programming in Solaris

    I want a small piece of java code to connect a OpenOffice Database (*.odb) . Here, db = DriverManager.getConnection("jdbc:odbc:Driver={MicroSoft Access Driver (*.mdb)};DBQ=D:/data/Access/test1.mdb","dba","sql");instead of "Microsoft ACCESS DRIVER" wh