Using existing c code for usb-hid communicat​ion in labview

Hello,
I want to write a simple temperatrue logger using labview and a external hardware which communicates over usb-hid. The external hardware uses an ATMEL 90USB162 µC and DS18B20 sensors.
Link to the hardware:
http://www.diamex.de/dxshop/USB-Temperatur-Sensor-​Tester-fuer-DS18B20
The source of a a simple command line tool is available (see attachement), which reads out the temperature value of the connected sensors.
Is it possible to include this c-code in the labview application to simplify the communication?
Thanks a lot and best regards,
Michael
Solved!
Go to Solution.
Attachments:
CMDLINE.zip ‏17 KB

I'm not that experienced at this personally (in terms of compiling C code into DLLs), but I believe the process you need to go down to call your C code in LabVIEW is to compile the C code into a DLL which you can then call from LabVIEW using a Call Library Function node (or you can try to use the "Import Shared Library" wizard to automatically generate SubVIs).
There's more information here:
http://digital.ni.com/public.nsf/allkb/DCB90714981​A1F148625731E00797C33
Certified LabVIEW Architect, Certified TestStand Developer
NI Days (and A&DF): 2010, 2011, 2013, 2014
NI Week: 2012, 2014
Knowledgeable in all things Giant Tetris and WebSockets

Similar Messages

  • Use DAQmxSetDigitalPowerUpStates In VB6 for USB-6501

     How do I use DAQmxSetDigitalPowerUpStates In VB6 for USB-6501
    I am trying to set thre default power on state for all digital lines
    DAQmxErrChk DAQmxSetDigitalPowerUpStates("Dev3", "Dev3/port0/line0:7", DAQmx_Val_Low, 8)
    The above line of code Crashes VB6.0 SP5 VB shuts down as soon as I try to exicute this code

    Hi CUImsch,
    The DAQmxSetDigitalPowerUpStates function takes four arguments: deviceName,
    channelNames, state, and "...".  The "..." indicates
    that you can include additional channelNames and state arguments. The final
    channelNames and state pair must be followed by a NULL argument. For example,
    to set port0 to a default low state use:
        DAQmxSetDigitalPowerUpStates("Dev3",
    "Dev3/port0/line0:7", DAQmx_Val_Low, NULL)
    If you want to set multiple ports with the same function call, include their
    channelNames and state arguments after the first port's arguments and follow it
    with NULL to indicate that you're done listing channels.
        DAQmxSetDigitalPowerUpStates("Dev3",
    "Dev3/port0/line0:7", DAQmx_Val_Low, "Dev3/port1/line0:7",
    DAQmx_Val_Low, NULL)
    The NI-DAQmx C Reference Help contains more information on this function.
    Specifically under the Help Contents: NI-DAQmx C Functions » System
    Configuration » DAQmxSetDigitalPowerUpStates.
    I hope this helps! Let me know if there is anything else I can help with or
    clarify. Have a great day!
    Message Edited by ryan_d on 09-24-2007 06:10 PM
    Ryan D.
    District Sales Manager for Boston & Northern New England
    National Instruments
    Attachments:
    SetDigitalPowerUpStates.JPG ‏155 KB

  • Can i use ms office code for mac air on my macpro instead of purchasing the CD

    can i use ms office code for mac air on my macpro instead of purchasing the CD?
    Because i just got a new macbook pro and my sister has the macair she purchased ms office for her mac air so i was wondering if i could just use her code or do i have to buy a specific Ms office CD for my kind of mac?

    Bibi234 wrote:
    can i use ms office code for mac air on my macpro instead of purchasing the CD?
    Because i just got a new macbook pro and my sister has the macair she purchased ms office for her mac air so i was wondering if i could just use her code or do i have to buy a specific Ms office CD for my kind of mac?
    Office for Mac comes with a single or (for extra cost) a 3 license pack. Unless your sister has multiple user licenses you may not use her code.

  • How do i use existing email address for digital editions

    how do i use existing email address for digital editions

    Three possibilities.
    1) If you already have an up to date Adobe account with associated email, you need to register it with ADE.
    menu/Help/Authorize Computer (Library/Authorize Computer on the older more reliable v1.7.2).
    2) If you already have an Adobe account/ID and have books that have been bought using it, then you should change the email associated with that account.
    Login at the adobe.com website ('sign in' near top right), using the old email the account is currently associated with. 
    (Doesn't matter if this is no longer valid as an email address, it is still valid to access your Adobe account)
    Choose  'My Information' on the 'Welcome' dropdown, enter your new email in the appropriate place, and confirm changes.
    You will later need to validate that new email address by clicking on the confirmation email it will send.
    Then follow step 1.
    If you have an old account and the email is no longer valid and you've forgotten the password, try Adobe Live Chat to get access to the account again.
    3) You need to create yourself a brand new account.
    Click the 'sign in' and choose 'Dont' have an Adobe ID'.
    Once you have established oe, go to step 1

  • To use the same code for many movieclips

    Dear all.
    I am using the flash to build my personal book online. I need zoom  many movieclip, my images.
    i make the code and function perfectly. But I want to find a way to use the same function for all movieclips and so, mantaining my code clean.
    mc_01.addEventListener(MouseEvent.MIDDLE_MOUSE_DOWN, Drag);
    mc_01.addEventListener(MouseEvent.MIDDLE_MOUSE_UP, unDrag);
    mc_02.addEventListener(MouseEvent.MIDDLE_MOUSE_DOWN, Drag);
    mc_02.addEventListener(MouseEvent.MIDDLE_MOUSE_UP, unDrag);
    and many others....
    function Zoom(e:MouseEvent):void
            mc_01.x = 0;  //I try here for this.x but the previews movie, called "Books" is who have changed your x value.
            mc_01.y = 0;
    I
    EDIT: For untangle, the previews movie is called MyAllPhotos and then, contain all movieclips that are each movie clip is one my images

    Hi Mr Kglad.
    And when I call a property like a X position I use this["mc_"+padF(i)].x = 0;  for substitute the mc_01.x = 0 ?
    My problem realy is inside the function. Your loop add an event to my clips and direction to function Drag and UnDrag.
    But inside in this functions, I need get some informations for the clip.
    Here the code:
    function Zoom(e:MouseEvent):void  //Sorry, but the correct name my functions is Zoom and not Drag and unDrag
               var mod:Number = 50;
               mc_01.scaleX += e.delta / mod; //in this name mc what I need to use? this, parent? I try and not function.
               mc_01.scaleY += e.delta / mod;

  • How to use Event Tracking Code for Google Analytics in Dreamweaver CS5

    I need to track clicks on links that go to an outside website. I've read about "event tracking code". I'm not sure if it's the right tool to use. And if it is, I've spent several hours reading about it and I can't figure out how to use it. It looks like you need to be an expert developer to be able to make sense of all this. I've always been helped when I ask a question here, I'm hoping that someone can help me.
    What my client needs is to know what links are being clicked, and how often. Here's the page where I want to do this: Available Homes - Arizona Vacation Home Rentals 
    I added a code that I created using the tool I found here: General Event Tracking Code for Google Analytics but can't see to be able to make this work. I added this code to the first link called "View it Here" for the top, left house. Here's the code: <a href="http://www.homeaway.com/vacation-rental/p3495538" onClick="ga('send', 'event', { eventCategory: 'clicks', eventAction: 'clicks on homes', eventLabel: 'Clicked'});" target="_blank">View it HERE!</a> 
    Then I set a Goal in Google Analytics like it said in the instructions but it doesn't seem to work... I would APPRECIATE ANY HELP!
    Thanks,
    Brigitte

    I think you misunderstood what Event Tracking is designed for.  This is from Google Help
    Tracking Code: Event Tracking - Google Analytics — Google Developers
    "Use this to track visitor behavior on your website that is NOT related to a web page visit, such as interaction with a Flash video movie control or any user event that does not trigger a page request."
    Clicks on links are page requests.  I think for your purposes, you may want the Cross Domain Link Tracking plugin.
    Cross Domain Tracking - Web Tracking (analytics.js) - Google Analytics — Google Developers
    Nancy O.

  • Can I use the redemption code for more than one machine for Photoshop Elements?

    I want to use the Photoshop Elements that I bought on more than one machine. Is that
    possible using the Redemption Code? It says it was used with another Adobe ID.
    Thanks

    Hi Stover,
    Typically you use the redemption code to retrieve your serial number for Elements products. The licensing for Elements allows the owner to install on two of their computers.
    See these for reference:
    Redemption Code Help
    How many computers can I install Photoshop Elements on?
    Hope that helps,
    - Dave

  • Most use ful t code for Material Master changing

    Dear All,
    Can any one give me most useful T-codes for create, change and display material master.
    I have one T-code which is very useful for material master it is "MM50". With help of this tcode you can see material extend detail and also you can delete mass material with help of this tcode.
    So please use it and also give me other this type of tcodes.
    Regards,
    Mahesh Wagh

    Hi,
    MM17, LSMW, MM50 --- These are the 3 main transactions which is used frequently to Mass change the  Material master.
    There is one more option is there using BDC Upload.
    Batch Data Communication or BDC is a batch interfacing technique that SAP developed. It is mainly used for uploading data into the SAP R/3 system. BDC works by simulating the user input from transactional screen via an ABAP program.
    The data input data file will come in the form of a flat file which the user save as file type txt file or prn file from the Microsoft Excel program. An Abaper will create a program to read the text file and upload into the SAP system.
    Transaction -- SHDB will be used to record the change material master. After, the simulation, the Abaper can generate a sample program and modify from there. It makes the programming easier and faster.
    For a BDC upload you need to write a program which created BDC sessions.
    hope you got it. Take a help of  ABAPer for this BDC Upload.
    rgds
    Chidanand

  • Does any company make a Express Card 34 that can be used in the 17 for USB 3.0

    I want to use an external seagate external USB 3.0.
    Is anyone making one for the Express34 PC Card and if so do you get the extra speed for read and write. 

    Theoretical and acual speeds for all types data connections can differ due to several variables.  I cannot tell you if my eSata connection has ever achieved the theoretical maximum speed because I have never measured it.  However I have compared transfer times against Firewire with large files and it is noticeably faster (at least by 50%+).  Therefore I highly recommend having it if you need to transfer large files from one HDD to another.
    If you have a recent MBP, you already have a Thunderbolt connection.  I do not believe that there will be a Thunderbolt Express Card for older MBPs because they are not configured to accept that technology.
    Ciao.

  • How to use same CMOD code for 2 Diff. variableS?

    Experts,
    I have written some code under CMOD. Now, i have another query which i could use the same CODE, but diff. variable
    ( In the CMOD code, i am passing one User input variable ). For the 2nd query i have to pass different User Input variable.
    How OR what should i wright to tell CMOD, that IF its Query # 1 then use ABC variable and if Query # 2 then use XYZ .
    thanx

    Dear Hon Bon,
    Let us have a small example on ur scenario.
    Lets take the requirement as to calculate Month from Date. (In both the queries).
    Query 1: Input variable for Date is say  'ZDATE1'.
    Query 2: Input variable for Date is say  'ZDATE2'.
    Now let the CMOD variable be ZVAR_CALMONTH.
    when 'ZVAR_CALMONTH'.
        clear: lwa_var_rng,
               lwa_range.
        loop at i_t_var_range into lwa_var_rng where vnam = 'ZDATE1' or vnam = 'ZDATE2'.
          concatenate lwa_var_rng-low+0(4)
                      lwa_var_rng-low+4(2)
                 into lwa_range-low.
          lwa_range-sign = 'I'.
          lwa_range-opt  = 'EQ'.
          append lwa_range to e_t_range.
          clear lwa_range.
        endloop.
    Now when you execute the Query1,  the above code will work for 'ZDATE1' variable,
    if you execute the Query2,  the above code will work for 'ZDATE2' variable.
    So, the key point is,
    1. You need not worry about which query is getting executed. Whatever the query, the particular user entry variable of that query will be taken care.
    2. This method works only if the cmod variable (ZVAR_CALMONTH) is used in both the queries (Ofcourse its ur requirement).
    3. If queries have both the user entry variables then the cmod will work differently(it ll get data from both the user variables).
    You shall try ur code in the above example by replacing the code and the variable names and try playing around it.
    Hope this helps.
    Regards,
    Guru

  • Using square register code for ecommerce

    folks
    first let me apologize for not being well versed in this as i am sure you all are. 
    I was a photographer for 20 years  but left the field before it became digital and have been a retailer ever since (25 years now). 
    So i do have some graphics training, but my digital skills are almost zero. 
    Which is why i like muse.
    i currently own a tea shop and have had requests for online sales.  i have avoided it for a year but i think i have to do it.
    i use 'square' in the shop for register, credit cards, inventory etc. and would love to keep that integrated for online sales.
    i spoke to the folks at square and they have a code ready to be embedded into my site by me that will allow me to sell online.
    simple they said..... copy and paste the code into your site they said.....
    I have NO clue how to do that with muse.
    so...
           1. is there anyone doing a widget that uses the square code? that i could drag and drop?  that would be ideal.
               i am sure i am not the only clueless person that could use that.
    or
           2. could someone tell/show me how to do it?
    it would really help and you would bring joy to many people who want to buy tea from me.
    Thanks
    Bob

    There might be a Weblogic API that allows you to manage Weblogic. If so a Weblogic forum would be the place to ask.

  • USB RAW Control Communicat​ion in LabVIEW

    Iam trying to open the zipped file by NI "USB RAW Control Communication in LabVIEW".The VI is attached below.It recognized my raw device in VISA Resource Name.Iam using a pendrive.But while running it shows an error 'VISA:  (Hex 0xBFFF0072) The resource is valid, but VISA cannot currently access it.'I learned this problem from some discussion forums in labview,but can't find a solution.Plz help.Post your valuable suggestions........Also in that example how we will give the request,request type,value,index etc:-.What does it indicates?
    Thanks as kudos only
    Attachments:
    USBRawControl.vi ‏152 KB

    STOP creating multiple posts for your question!
    http://forums.ni.com/t5/LabVIEW/Requirements-to-re​ad-from-a-USB-port/td-p/1959445

  • PLC Communicat​ions with Labview

    How do I view and record data from my plc to labview, currently we are using autmation directs DL205 with the 260 processor

    If the DL 205 communicates through the Modbus protocol, you could use the Modbus library. This library consists of a bunch of VIs which can be used for Modbus communication. Think of them as advanced Serial read/write VIs. However, if you are looking into monitoring, datalogging and controlling the registers, then I would recommend the LabVIEW Datalogging and Supervisory Control Module. Using shared variables, you can then easily bind, control and talk to the registers and most of the work is taken away from you.
    If the DL 205 doesn't communicate throught the Modbus protocol, then you would need an OPC server (like the NI Industrial Automation OPC Servers) and the LabVIEW DSC Module. You can then communicate from the LabVIEW DSC Module with the OPC server.
    Message Edited by Adnan Z on 03-15-2007 10:27 AM
    Adnan Zafar
    Certified LabVIEW Architect
    Coleman Technologies

  • C++ Code for USB-6211

    Hi,
    I was wondering if the examples codes provide with the DAQm base driver software, written in C, is fully compatible with C++. 
    I trying to develop my own program in C++ that will log voltages from 3 different sources using the USB-6211. 
    Solved!
    Go to Solution.

    Hello burnt,
    I do know that a lot of code written in C can be compiled in C++, but I can't promise that the DAQmx Base code written in C is going to work.  Have you tried compiling any of the C examples in C++ and, if so, did this work for you at all?
    Regards,

  • How do I create a disk image for windows 7, using a windows computer for USB bootcamp for mac?

    Hi There, I have just bought a new 2013 iMac.
    Spec: 3.4 GHz intel core i5, 16GB 1600 MHz DDR3 Memory , NVIDIA GeForce GTX 775M 2048 MB Graphics with OS X 10.9.4.
    How can I create a 'disk image' from a windows 7 professional 64bit installation DVD using a windows laptop with windows 7 Operating system on? I want to transfer this 'disk image' (ISO?) to a USB ready for installing windows onto my 2013 iMac using bootcamp?  I want to use bootcamp from a USB as I have no disk drive for the installation DVD on my iMac. I hope all this is clear.
    Thank you. Joe

    Yes, that's correct, at least not directly. You can create a blank disk image, copy the file to the mounted disk image, then burn the image to a CD/DVD.
    Open Disk Utility and select Blank Disk Image from the New menu. Provide a name, Save location, and select the image size from the drop down menu. Leave Encryptions at None and Format as read/write. Click on the Create button.
    After the image file appears the "removable" disk should be automatically mounted. If not double-click on it to mount it. A "removable" disk icon will appear. Drag the file you want to place on the disk image to the "removable" disk icon. The eject the "removable" disk icon. Now select the disk image file in the DU left side list and click on the Burn icon in the DU toolbar. Be sure to have a blank disc ready.
    The above is actually the "long" way to do this. A much easier way is to simply insert a blank CD or DVD into the optical drive. The Finder will pop up a dialog asking what to do. Select the option to mount on the Desktop. You will now see a disc icon on the Desktop. Drag the file you want to burn to the CD/DVD, right-click or CTRL-click on the disc icon and select Burn from the contextual menu.
    Why reward points?(Quoted from Discussions Terms of Use.)
    The reward system helps to increase community participation. When a community member gives you (or another member) a reward for providing helpful advice or a solution to their question, your accumulated points will increase your status level within the community.
    Members may reward you with 5 points if they deem that your reply is helpful and 10 points if you post a solution to their issue. Likewise, when you mark a reply as Helpful or Solved in your own created topic, you will be awarding the respondent with the same point values.

Maybe you are looking for