How to compile COM 1 data with LabVIEW?

  I have a device connected to my COM 1 port. How do I input data with that into labVIEW? The program that comes with it is really elementary, it only shows me the data that the comes straight from the device, no analysis.  Its like labVIEW and MAX dont recognize the device, but my device manager says its connected and works fine. How do i input that data and compile it with labVIEW?

Much better
MAX will not detect instruments connected to a com port. The reason is that there is no standard for serial instruments (unlike GPIB). You should only have your com port listed in MAX. If the instrument is listed in your device manager, then it sounds like the driver you got with the instrument is a little weird. It may be that the driver software has taken control over one of your serial ports. Normally, all you would have to do is use the serial functions on the Instrument I/O palette. However, if the instrument driver has taken control of the com port, you won't be able to do this because the OS will only allow one process access to the port at any one time. You can test this by trying to open a Hyperterminal session to the com port. If you can an error indicating that the port is in use, then that's the driver running in the background. You can uninstall the driver and everything should be okay. You could also try to use the driver as provided. I'm assuming it's a DLL. You could call the functions in the DLL with the LabVIEW Call Library Node function. You will need documentation from the vendor on the DLL in order for this to be done. It's probably simpler, though, just to use the LabVIEW serial functions. You would still need the command set/syntac from the instrument manufacturer in order to communicate with it.

Similar Messages

  • How to validate a date with time

    Hi All,
    How can I validate date with time?
    Here is my code:
    var tempDate:Date = new Date();
    if (tempDate < '09/18/2012 7:30:00 AM'){
         doSomething
    Thanks in advanced

    I think i got it to work.
    var tempDate:Date = new Date();
    var oldDate:Date = new Date('09/18/2012 7:30:00 AM');
    if ( Number(tempDate) < Number(oldDate) ){
         doSomething
    Best,

  • How to compile DNG SDK with GCC?

    I tried to compile DNG SDK with GCC, but I got stuck to the following error message:
    ... dng_flags.h:33:28: error: RawEnvironment.h: No such file or directory ...
    In other words, it seems that file 'RawEnvironment.h' is missing. I cannot find this file from DNG SDK or XMP SDK. Do you know where I could find this file or do you know how to compile DNG SDK with GCC?
    Regards Sami

    Please define either qMacOS or qWinOS (i.e., in your list of preprocessor defines). As you can see in line 32 of dng_flags.h this is required.

  • How to seperate the data with comma seperator ??

    Hi,
      How to seperate the data with comma seperator ??
    E.g i havea row like
    Userid,number of days,Total Records
    user1,10,100000
    So,i will get 10,10000 in the same field and i need to seperate 10 and 10000 so what is the abap function for that
    Praff

    like this ...
    SPLIT field AT ',' INTO
       userid
       days
       records.
    is this what you need?
    Mike

  • How to compile and link the LabView program(G) with some function written in C?

    Before, some employee in our company developed some program which was written in LabView (G). Now we want to add some new function with has already been done in C++. Can we combine them together? how to do it?

    Hi;
    To use external code in LabVIEW, you can create a dynamic link library (.dll) that you can call from LabVIEW or a Code Interface Node (CIN). The instructions on how to make any of those are in National Instruments manual Using External Code in LabVIEW, which is included with LabVIEW, or you can download it from NI website.
    Also, in the knowledge base there is a "External Code for LabVIEW - CIN / DLL - Starting Point" page.
    If, on the contrary, you want to use LabVIEW code on your C application, you can build dll's in LabVIEW. Depending on your version of LabVIEW, you may need Application Builder to do so.
    Of course, you can also use other techniques like, for example, making that your LabVIEW application save the data in a file and then your C++ application read the file and continues from there, or vice versa. You can also use the "System Exec.vi" in LabVIEw to do that, assuming your C code is an executable.
    Regards;
    Enrique
    www.vartortech.com

  • How to build demo versions with Labview ?

    Hello,
    is it possible to design Labview applications in a kind,
    that it is possible to generate "demo versions" of it ? Demo version in the means of feature-limited crippled versions of a full instrumentation software, where SOME hardware access is denied, but you can load and view and analyse data.
    Of course it might be useful to compile this demo version with the Labview Application Builder,
    What might be the business modell for demo versions:
    A hardware manufacturer creates a Labview application which controls the manufacturer's components, and allows instrumentation and data recording. The application is not free but sold for extra money.
    As pre-sales benifit, the manufacturer would like to send the (compiled) Labview application to future customers.
    Now the problem is, that the customer has not (all) the external devices or PCI/USB devices,
    on the other hand the hardware manufacturer does not want to give the "full application" as gilft to the customers.
    Now with traditional software development with C++, Java, C#,
    either a demo version is gained from the full version by replacing some module with hardware access by modules wth "empty" function body or with function body which return constant values instead of accessing the hardware.
    In the world of process industry, usual process control systems may supply "alternative" values if the original device is not available.
    What kind of software structure must I build with Labview, to do the same ?
    Now the problem with Labview applications is
    Labview applications depend on drivers. Drivers depend on hardware.
    So if the FULL commercial version of the Labview program accesses a DAQmx driver, GPIB driver or any other hardware driver by a VI,
    and often this means that a special manufacturer VI is used in the Labview program which does the actual hardware access,
    how to modify the software to make a demo version
    a) so that IF the customer buys the hardware and gets the hardware driver, he still does not have the full version
    b) so if the customer neither has the hardware nor the driver, he still can run the Labview software and load an view data, push buttons, can execute menu items even can manipulate data ect, can use the manufacturer's VI
    Unfortunately, it is no solution just to delete "some" of the VIs with hardware access from the distribution of the demo version, as this just causes error messages during the loading of the (compiled) Labview demo application.
    Message Edited by hemmerling on 01-11-2007 12:35 AM
    Message Edited by hemmerling on 01-11-2007 12:37 AM

    Thanks alot.
    Conditional Disable and Diagram Disable Structures
    http://zone.ni.com/reference/en-XX/help/371361B-01/lvconcepts/cond_diagram_disable/
    are indeed at least a part of what I wanted.
    Anyhow, as such "suspended" VIs are often the *source* of signals,
    so there must be an addtional method how to provide "alternative" signals for the demo version,
    which does not make the administration / further development the full version  too complicated...
    For example: The VI for an external signal generator device is disabled, but alternatively it would be nice if the users of the demo version can get a fixed sinus signal instead...
    How to do that with Labview and the "Conditional Disable and Diagram Disable Struktures",
    and can I test this all even without Labview Application Builder, in the full development system ( so that I don´t need the compiler for frequent checking ) ?
    Btw, with what version was this "Conditional Disable and Diagramm Disable" feature introduced ? Is ist already available with Labview 7.0, /.1 ?
    Sincerely
    Rolf

  • How to compare current date with past date

    Sample code for comparing current date with past date
    i dont want to Calender.set method to compare it.
    How can i do it?

    PLEASE stay with ONE thread:
    http://forum.java.sun.com/thread.jspa?threadID=5143991&tstart=0

  • How to use matlab function with labview?

    Hello,
    I just want to use some matlab functions like floor(),ones()... in my labview code, who can tell me how to do it?
     I want to only install MCR in my PC, so MATLAB script node can not work because it need matlab installed. 
    Thanks
    Solved!
    Go to Solution.

    floor() exists on the standard labview pallet already and the ones() function would be fairly simple to reproduce. If you only need a few basic functions repost asking for direction on recreating those specific methods. However, you're right - there is not a direct way to use compiled matlab code in labview without full matlab and the math script nodes. If you're really desparate to reuse some some exisiting IP there are C++ alternatives that implement many of the same methods and syntax as matlab (http://arma.sourceforge.net/faq.html). I'm fairly sure there are other tools that attempt to translate matlab code into pure c functions, both of which can be called via a DLL from within labview: https://decibel.ni.com/content/docs/DOC-9076
    Alternatively, here is an all NI linear algebra solution: http://sine.ni.com/nips/cds/view/p/lang/en/nid/210525

  • How to sign the data with DHPrivateKey

    I am testing DH key exchange protocol. When I run the following code, it works.
    import java.io.*;
    import java.math.BigInteger;
    public class DH2 {
        private DH2() {}
        public static void main(String argv[]) {
            try {
                String mode = "USE_SKIP_DH_PARAMS";
                DH2 keyAgree = new DH2();
                if (argv.length > 1) {
                    keyAgree.usage();
                    throw new Exception("Wrong number of command options");
                } else if (argv.length == 1) {
                    if (!(argv[0].equals("-gen"))) {
                        keyAgree.usage();
                        throw new Exception("Unrecognized flag: " + argv[0]);
                    mode = "GENERATE_DH_PARAMS";
                keyAgree.run(mode);
            } catch (Exception e) {
                System.err.println("Error: " + e);
                System.exit(1);
        private void run(String mode) throws Exception {
            DHParameterSpec dhSkipParamSpec;
            if (mode.equals("GENERATE_DH_PARAMS")) {
                // Some central authority creates new DH parameters
                System.out.println
                    ("Creating Diffie-Hellman parameters (takes VERY long) ...");
                AlgorithmParameterGenerator paramGen
                    = AlgorithmParameterGenerator.getInstance("DH");
                paramGen.init(512);
                AlgorithmParameters params = paramGen.generateParameters();
                dhSkipParamSpec = (DHParameterSpec)params.getParameterSpec
                    (DHParameterSpec.class);
            } else {
                // use some pre-generated, default DH parameters
                System.out.println("Using SKIP Diffie-Hellman parameters");
                dhSkipParamSpec = new DHParameterSpec(skip1024Modulus,
                                                      skip1024Base);
            System.out.println("ALICE: Generate DH keypair ...");
            KeyPairGenerator aliceKpairGen = KeyPairGenerator.getInstance("DH");
            aliceKpairGen.initialize(dhSkipParamSpec);
            KeyPair aliceKpair = aliceKpairGen.generateKeyPair();
            System.out.println("ALICE: Initialization ...");
            KeyAgreement aliceKeyAgree = KeyAgreement.getInstance("DH");
            aliceKeyAgree.init(aliceKpair.getPrivate());
            byte[] alicePubKeyEnc = aliceKpair.getPublic().getEncoded();
            KeyFactory bobKeyFac = KeyFactory.getInstance("DH");
            X509EncodedKeySpec x509KeySpec = new X509EncodedKeySpec
                (alicePubKeyEnc);
            PublicKey alicePubKey = bobKeyFac.generatePublic(x509KeySpec);
            DHParameterSpec dhParamSpec = ((DHPublicKey)alicePubKey).getParams();
            System.out.println("BOB: Generate DH keypair ...");
            KeyPairGenerator bobKpairGen = KeyPairGenerator.getInstance("DH");
            bobKpairGen.initialize(dhParamSpec);
            KeyPair bobKpair = bobKpairGen.generateKeyPair();
            System.out.println("BOB: Initialization ...");
            KeyAgreement bobKeyAgree = KeyAgreement.getInstance("DH");
            bobKeyAgree.init(bobKpair.getPrivate());
            byte[] bobPubKeyEnc = bobKpair.getPublic().getEncoded();
            KeyFactory aliceKeyFac = KeyFactory.getInstance("DH");
            x509KeySpec = new X509EncodedKeySpec(bobPubKeyEnc);
            PublicKey bobPubKey = aliceKeyFac.generatePublic(x509KeySpec);
            System.out.println("ALICE: Execute PHASE1 ...");
            aliceKeyAgree.doPhase(bobPubKey, true);
            System.out.println("BOB: Execute PHASE1 ...");
            bobKeyAgree.doPhase(alicePubKey, true);
            byte[] aliceSharedSecret = aliceKeyAgree.generateSecret();
            int aliceLen = aliceSharedSecret.length;
            byte[] bobSharedSecret = new byte[aliceLen];
            int bobLen;
            try {
                bobLen = bobKeyAgree.generateSecret(bobSharedSecret, 1);
            } catch (ShortBufferException e) {
                System.out.println(e.getMessage());
            bobLen = bobKeyAgree.generateSecret(bobSharedSecret, 0);
            System.out.println("Alice secret: " +
              toHexString(aliceSharedSecret));
            System.out.println("Bob secret: " +
              toHexString(bobSharedSecret));
            if (!java.util.Arrays.equals(aliceSharedSecret, bobSharedSecret))
                throw new Exception("Shared secrets differ");
            System.out.println("Shared secrets are the same");
            System.out.println("Return shared secret as SecretKey object ...");
            bobKeyAgree.doPhase(alicePubKey, true);
            SecretKey bobDesKey = bobKeyAgree.generateSecret("DES");
            aliceKeyAgree.doPhase(bobPubKey, true);
            SecretKey aliceDesKey = aliceKeyAgree.generateSecret("DES");
            Cipher bobCipher = Cipher.getInstance("DES/ECB/PKCS5Padding");
            bobCipher.init(Cipher.ENCRYPT_MODE, bobDesKey);
            byte[] cleartext = "This is just an example".getBytes();
    //        Signature signature = Signature.getInstance("SHA1withDSA");
    //        signature.initSign(bobKpair.getPrivate());
    //        signature.update(cleartext);
    //        byte[] data = signature.sign();
            byte[] ciphertext = bobCipher.doFinal(cleartext);
            Cipher aliceCipher = Cipher.getInstance("DES/ECB/PKCS5Padding");
            aliceCipher.init(Cipher.DECRYPT_MODE, aliceDesKey);
            byte[] recovered = aliceCipher.doFinal(ciphertext);
            if (!java.util.Arrays.equals(cleartext, recovered))
                throw new Exception("DES in CBC mode recovered text is " +
                  "different from cleartext");
            System.out.println("DES in ECB mode recovered text is " +
                "same as cleartext");
            bobCipher = Cipher.getInstance("DES/CBC/PKCS5Padding");
            bobCipher.init(Cipher.ENCRYPT_MODE, bobDesKey);
            cleartext = "This is just an example".getBytes();
            ciphertext = bobCipher.doFinal(cleartext);
            byte[] encodedParams = bobCipher.getParameters().getEncoded();
            AlgorithmParameters params = AlgorithmParameters.getInstance("DES");
            params.init(encodedParams);
            aliceCipher = Cipher.getInstance("DES/CBC/PKCS5Padding");
            aliceCipher.init(Cipher.DECRYPT_MODE, aliceDesKey, params);
            recovered = aliceCipher.doFinal(ciphertext);
            if (!java.util.Arrays.equals(cleartext, recovered))
                throw new Exception("DES in CBC mode recovered text is " +
                  "different from cleartext");
            System.out.println("DES in CBC mode recovered text is " +
                "same as cleartext");
    }I want to sign the data with Signature,So i add the following code to the sample.
            byte[] cleartext = "This is just an example".getBytes();
         Signature signature = Signature.getInstance("SHA1withDSA");
            signature.initSign(bobKpair.getPrivate());
            signature.update(cleartext);
            byte[] data = signature.sign();
            byte[] ciphertext = bobCipher.doFinal(cleartext);Run the code again, the output is
    Error: java.security.InvalidKeyException: No installed provider supports this key: com.sun.crypto.provider.DHPrivateKey
    What's wrong with the code, It seems that the bob's private key is not instance of DSAPrivateKey but DHPrivateKey.
    what's your comment? thanks a lot.

    slamdunkming wrote:
    thank sabre150 for your reply. But the key pair is generated when I use DH to exchange the secret key. Yes! It is a DH key pair and cannot be used for signing. The DH key pair can only be used for secret sharing.
    If I can not use this private key to sign the data, what can i do?Do I have to generate another key pair for signature? In that way, I will have two key pair. Yep. You can generate a DSA or an RSA key pair to be used for signing.
    Because I use http protocol to exchange the key to get the shared secret key, Yep.
    If I generate another key pair, how can i send the public key to server? Since public keys are 'public' then you can send them in the open to anyone you like. In fact, if you don't publish your public keys then they are pretty much a waste of time. The biggest problem one has with public key is proving 'ownership' - if someone sends me a public key how do I know that the sender is actually who they say they are?.
    I am confused.Some reading might help. A pretty good starting point is "Beginning Cryptography with Java" by David Hook published by Wrox.

  • How to import Spacial Data with mapviewer into Database?

    I have deployed mapviewer10133wls with oc4j and able to see mapviewer home page but don't know how to get started with mapviewer like what configuration it needed and how to import sapcial data into Database with mapviewer. please help with reply.
    Thanks,
    Suchetana.

    If its the Oracle Spatial option you're after, its not included in XE http://download.oracle.com/docs/cd/B25329_01/doc/license.102/b25456/toc.htm#BABJIJCJ
    For GIS data, I'll be no help at all someone else here may have experience with it. If its something that can fit into RDBMS tables there is probably a way to do it without Spatial, but that's just a guess :(

  • How to maintain master data with 3 different IS components

    Dear Gurus
    We have got 5 companies and we are implementing SAP with 3 IS components.
    1) We are implementing IS-EC&O (DIMP).
    2) Implementing IS-DBM (Dealership Business Management system)
    3) We have IS-Real Estate.
    The companies will have shared services such as HR, group Procurement and Finance, This functionality will reside on a main ECC 6.0 system.
    Can someone explain:
    1- How and where would master records reside?
    2- How are the various databases will communicate?
    3- Can all the 4 above systems share a single database?
    Thanks in advance
    Regards

    The companies will have shared services such as HR, group Procurement and Finance, This functionality will reside on a main ECC 6.0 system.
    Can someone explain:
    1- How and where would master records reside?
    On the master ERP 6.0? on an MDM server? there are various possibilities.
    2- How are the various databases will communicate?
    The databases won´t communicated but the systems on top.
    3- Can all the 4 above systems share a single database?
    They can share the same database software using MCOD (http://service.sap.com/mcod) - with all pros and cons but you will need to have the same master data in all instances though.
    Markus

  • How sharing a COM object with severeal test dlls in teststand

    I have several tests (dlls) accessing a DAQ board (not VI compliant) thanks to a COM object. I would like to keep one instance of this object, passing its reference to each test dll, instead of creating one in each test. How can I do that with TestStand?

    You can do one of two things to store a reference to the COM object in the context of TestStand so that you can pass it to successive steps in order for them to all use the same object instance.
    First, if you create the object in TestStand with an ActiveX Automation Adapter step, the method call to instantiate the object should return a reference to the object. If you designate an activex reference type local variable as the property to receive the reference during the creation operation, you should be able to pass this into methods that use IDispatch* parameters, or you can use the TestStand API to access the TestStand variable instead.
    The second scenario is very similar, in that if you don't create the object in TestStand but inside of a dll instea
    d, you can simply pass the parameter back from a function into a TestStand activex reference property variable or use the TestStand API inside of the dll to set the value of an activex reference property to the IDispatch of the object.
    To better understand how to use the ActiveX Automation Adapter and ActiveX Reference Variable Types, look at Chapter 13 of the TestStand User Manual under the section entitled "ActiveX Automation Adapter". I have also attached an example to this post that uses the ActiveX Automation Adapter and ActiveX reference datatype in a sequence that writes data to a Microsoft Excel spreadsheet and generates a chart from the data.
    Jason F.
    Applications Engineer
    National Instruments
    www.ni.com/ask
    Attachments:
    Write_Table_to_XL_and_Create_Chart.seq ‏53 KB

  • How to include print date with time on SkillBuilders Schedule Plug In?

    Hi,
    Do you have an idea how to include and get the print date with time on the SkillBuilders Plug In? It shows me the date only, time not included. Have tried to put "HH24:MI", "HH24MI" or Tochar(HH24:MI)? No result??
    select p.fullname, sbip_schedule.start_date(e.event_schedule) start_date
    , sbip_schedule.end_date(e.event_schedule) end_date
    , sbip_schedule.duration_seconds(e.event_schedule) duration_seconds
    , sbip_schedule.calendar_summary(e.event_schedule) calendar_summary
    from app_events e
    Thanks!

    I forget to clarify I am looking for the answer is how to get the print of date with time, Start date with time and End Date with time.

  • [solved]How to compile a software with debug symbol from aur?

    How does auch developers compile their project? Seems that archlinux user always trying to avoid build software from git/svn directly. But after searching a lot  I sill haven't found how to compile with debug symbol while using PKGBUILD.
    Anyone help?
    Last edited by ranjiao (2009-08-27 14:28:09)

    ranjiao wrote:PKGBUILD calls autogen.sh before calling make, and gnome-autogen.sh is called in autogen.sh
    I have tried to add --enable-debug while calling autogen.sh and gnome-autogen.sh, but it doesn't work.
    Isn't PKGBUILD just a script? It calls what you make it calls by adding commands...

  • How to compare Sale data with Previous data

    Hi Guys,
        Any one tell me how we will compare Sales data with Last year Sale data. Is there any T.Code or any kind of Report in the SAP. If available please suggest the same.
    Thanks & regards,
    Naveen Bhatia

    Hi Naveen,
    Did yo ucheck t-code SD01
    Regards
    Rohit.

Maybe you are looking for

  • GR for PO in wm

    hi, in general when  you put goods receipt for  purachse order for warehouse maintain material it will move to the source bin as purchase order number in interim storage area. when you confirm the TO it will move to the destination bin as configured

  • UDF to Handle multiple occurences of segments E1LFM1B & E1LFM1M in CREMAS04

    Hi All, Require help  for below problem. we are working on CREMAS IDOC to flat file scenario  and in it we have a requirement as mentioned below. CREMAS04     E1LFA1M                1..1        LIFNR                   1..1        E1LFB1M             

  • Oracle Forms Builder 10.1.2.3 hangs when opening canvas

    Hi I created a form with 1 master, 2 details and a tab panel. Now I can't open the canvas. Each time I try to open it Oracle Form Builder hangs. What can I do? Regards, Néstor Boscán

  • Printing Arabic and English Language on a smartform

    Hi All, i need a help. i wanna print English (Left to Right) and one more language of Arabic Style (Right to Left) on a smartform. I tried thru lot of means but the solution is big ZERO as of now. Please somebody help me. Thanks in advace. Kind Regar

  • SICF- only in display mode

    Hi all, I want the tcode SICF to be in display mode alone. Under which authorization object it comes? Can I make only in display mode. Regards, R.Suganya