M Series code for Labview

I am using the PXI-6230 on Linux.  I downloaded the MHDDK for NI-Visa, and the code uses C, along with some examples that are in C.  There are some good examples, but I need working code that will work in Labview.  Are there some examples that people have for the PXI-6230?  Or is there some way I can use the C code for Labview?  Any help is appreciated.
Thanks,
Thomas Pham

Hi Thomas,
The DDK is a set of reference examples for writing a device driver from scratch. Since most write-it-yourselfers expect to be running in an uncommon environment (where LabVIEW cannot run) or need to undergo some kind of final validation or peer review (where not everyone may have LabVIEW available), a text-based implementation provides them a faster "see how it works" starting point for those purposes.
When programming for the 6230 from LabVIEW, you have a few options available.
You can use the existing C++ chip objects in the DDK but manipulate them into a shared library (a .so) so that you can call the Library Function Node in LabVIEW [1].
You can use the register I/O palette [2] in VISA and transcribe the C++ chip objects into LabVIEW.
Expand the DAQmx Base driver [3] to make the extra RLP calls for the 623x (explained below).
All three are somewhat challenging, and you will also need some additional information about the specifics of programming for the 623x sub-family. Since they have isolated IO, some of the registers are re-purposed for enabling and disabling the isolators. There are several threads in this forum [4] about the 623x-specific calls that need to be made.
If you choose to exapand the DAQmx Base driver, you will find that a bug in the code will make the system think your 6230 is a 6222 [5]. In addition the 623x-specific RLP calls, you'll need to correct and differentiate the 6230 from the other M Series boards.
[1] Call Library Function Node -- LabVIEW Help
http://zone.ni.com/reference/en-XX/help/371361G-01​/glang/call_library_function/
[2] Register Access Functions -- VISA Help
http://zone.ni.com/reference/en-XX/help/371361G-01​/lvinstio/high_level_reg_acc_func/
[3] DAQmx Base 3.4 for Linux
http://joule.ni.com/nidu/cds/view/p/id/2128/lang/e​n
[4] 623x RLP Considerations
http://forums.ni.com/t5/forums/searchpage/tab/mess​age?location=Node%3A90&q=623x#message-list
[5] DAQmx Base 3.4 incorrectly attaches to the 6230
http://decibel.ni.com/content/message/20827#20827
Joe Friedchicken
NI VirtualBench Application Software
Get with your fellow hardware users :: [ NI's VirtualBench User Group ]
Get with your fellow OS users :: [ NI's Linux User Group ] [ NI's OS X User Group ]
Get with your fellow developers :: [ NI's DAQmx Base User Group ] [ NI's DDK User Group ]
Senior Software Engineer :: Multifunction Instruments Applications Group
Software Engineer :: Measurements RLP Group (until Mar 2014)
Applications Engineer :: High Speed Product Group (until Sep 2008)

Similar Messages

  • Creating Activation code for LabVIEW Applicatio​n Installer

    Hi,
    How could we create Activation code for LabVIEW Application Exe to restrict use to Single PC using LabVIEW settings/add-ons.
    I think NI should provide in-built feature in Application Builder to generate activation code as required.
    Regards,

    Or just vote for this idea.
    Try to take over the world!

  • Activation code for Labview

    I have an old labview version and I haveupgraded it to 8.2 version.A colleague will install the Labview software that I have but it asks for a activation code.Where can I get this activation code.Can u please provide an alternative solution.

    When you start LV for the first time, a dialog appears asking for the activation. Nevertheless, the dialog also provides instructions on how to get the code.....
    You can get further info here.
    hope this helps,
    Norbert B.Message Edited by Norbert B on 08-24-2007 03:53 AM
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Evaluation code for labview 2011

    from where i can get lv 2011 evaluation code 

    We first need to know what he means with the word "code".
    A: Code: The secret letters needed to activate LabVIEW.
    B: Code: The diagrams of a program written in LabVIEW.
    LabVIEW Champion . Do more with less code and in less time .

  • LabVIEW could not generate code for the shared variable.You must open the VI in the project that contains the library where the shared variable resides

    HI
    When I put a network shared variable with fifo RT activated on my diagram, the arrow is broken.and I' ve got this message:
    ""LabVIEW could not generate code for the shared variable.You must open the VI in the project that contains the library where the shared variable resides""
    If I uncheck FIFO RT option for this variable the arrow isn't broken anymore.
    I 've no idea how to correct this weird error?
    Autodeploy is on, and I've check copy / delete in diagram in tool/options\diagram
    regards,
    james

    Hello,
    I don't reproduce this error.
    Could you send your VI?
    Regards
    VéroniqueD
    NI France

  • Visual C/C++ code/Labview code for interfacing NI Hardware

    Hi,
     i need Visual C/C++ code/Labview code for interfacing NI Hardware and sample project example.

    Duplicate - http://forums.ni.com/t5/Instrument-Control-GPIB-Serial/Visual-C-C-code-Labview-code-for-interfacing-...
    You are just spamming now.

  • Hello sir,i need labview code for a code which is written in matlab,latter one is attached with this message.

    hello sir,i need labview code for a code which is written in matlab...
    clc;
    close all;
    clear all;
    Ez= zeros(1,200);
    Hy=zeros(1,200);
    Ca=1;
    Cb=.4519;
    n=1;
    while(n<1500)
    for k = 2:200
    Ez(k)=Ez(k) + Cb*(Hy(k)-Hy(k-1));
    end
    Ez(1)=1;
    for k=1:199
    Hy(k)=Hy(k)+Cb*(Ez(k+1)-Ez(k));
    end
    plot(Ez,'b')
    hold on
    plot(Hy,'r')
    hold off
    pause(0.001);
    n=n+1;
    end
    thanku

    Well, this code is quite trivial and if you have to learn LabVIEW anyway, you might as well try to implement it.
    A few things to remember:
    The first array element in LabVIEW has index #0, while in matlab it has index #1, so everything dealing with array indices needs to be adjusted slightly.
    The zeroes function equivalent is "initialize array".
    Keep the array in a shift register as you update elements.
    use FOR loops.
    Use one of the graphs to display the data.
    LabVIEW Champion . Do more with less code and in less time .

  • Driver for MM4000 series (motion controller) for labview 6.1 (gpib)

    Hello,
    I need the instrument driver for a newport motion controller MM4006.
    I found the driver for MM4000 series, it could be ok, but I need it for labview 6.1 and not  for labview 7 or 8.
    Is it possible to find this driver for older version of labview than 7 or 8?
    Thanks
    Best regards.
    Ludovic

    Good idea, I'm not sure of the result, but... Here is the zip file (aviable here).
    (oups, you were faster ^^)
    Message Edité par Mathieu R. le 12-08-2006 05:19 PM
    .mrLeft{float:left} .mrInfo{border-left:solid 1px #989898;font-size:x-small;color:#989898}
    Mathieu R.  
      CTD - Certified TestStand Developer / Développeur TestStand Certifié  
      CLAD - Certified LabVIEW Associate Developer  
    Attachments:
    npmm4000.zip ‏419 KB

  • Labview code for closing the command window

    Hi,
    This is naveen.Actually we are using 3rd paty test software for our mobile hardware testing which creates an DOS or Command window after execution.We have automated to execute this software using labview.the problem we facing is that we couldn't run the test software unless we close or kill the dos window opened in the previous run.So i like to know whether you have any labview code for closing or killing the DOS window ,i request you help me in this regard.
    regards,
    Naveen 

    Use the System Exec VI Owning Palette: Libraries & Executables VIs and Functions.
    And take a look here http://www.tech-recipes.com/rx/446/xp_kill_windows_process_command_line_taskkill/
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)

  • Can some body help me to develop labview code for generating pulse to drive ac servo motor

    can some body help me to develop labview code for generating pulse to drive ac servo motor... i am using NI 9401 card ....tnx

    Driving an AC servo motor would (I missed AC on the previous msg) requires some complex hardware. This is generally done by drivers specifically designed for this purpose. I doubt you will be able to accomplish this with the hardware you currently have and it might be cheaper to just buy a driver for it and control the speed through the driver.

  • Hi, can someone help me how can i connected my multimeter to my pc with rs232, because my computer can´t recognize the device, i mean the multimeter, is a multimeter keithley serie 2400, and i already downloaded all the drivers for labview even the VISA

    hi, can someone help me how can i connected my multimeter to my pc with rs232, because my computer can´t recognize the device, i mean the multimeter, is a multimeter keithley serie 2400, and i already downloaded all the drivers for labview even the VISA

    Marco,
    Here are some suggestions:
    1) Check the manual the Keithley manual to see how to configure the RS-232.   
        On some models you need set Factory defaults to USER and turn on the RS-232.   
        Also there may be a setting for SCPI which you want on (probably on by default).
    2) On your PC - open Device Manager. See if a COM port exists and is functional.
         You must get this working before continuing.
          You can set the COM port parameters by right clicking and selecting Properties.  
         (On some PCs the onboard ports can be disabled in the BIOS)
    3) If step two was OK, open MAX (Measurement and Automation eXplorer).      
        On the left side, click on Devices and Hardware.   
        Click on Serial and Parallel.   
        Go to the COM port you found in Device Manager.   
        Open a VISA Test Panel.
        Now I don't have one I can look at right now, so this is general idea:
       Configure the COM port to match the Keithley settings (should be OK if step 2 worked)  
       Go to the (I think) Input Output tab (you want to send a command)   
       The command string input should already have a *IDN? entered, if not, type it in.   
       Click on the Query button to send the command and check the response.  
       If you get an ID string back (Company name, Model, FW Version ...) then it works.   
       (Disregard an error saying it did not get enough charcters back.) 
    I hope this helps,
    steve
    Help the forum when you get help. Click the "Solution?" icon on the reply that answers your
    question. Give "Kudos" to replies that help.

  • Need help with LabVIEW code for motor control.

    Hi,
    My name is Sasi. I am a BME grad student working on my thesis topic of evaluating spine implants for low back pain. For this I am building a test machine that would apply pure moments to a spine specimen. I am using LabVIEW 8.5 to implement control of a brushless AC servo motor. My requirement is,
    Step 1: Initialize the motor.
    Step 2: Start moving it at a uniform RPM to the right (This RPM value too user can enter).
    Step
    3: While doin Step 2; simultaneously read torque cell data (Using DAQ
    asst.). DAQ o/p is from 0 V to 10 V; 0 V being -10 Nm n
                10 V being  +10 Nm
    Step 4: When Torque value reaches +10 Nm, i.e 10 V, the motor stops.
    Step
    5: From the position where motor stopped (i.e no need to reset to
    initial position) Start moving in the opposite direction at the same
                uniform RPM as in Step 2 while reading torque cell data.
    Step 6: Once again when torque reaches -10 Nm, i.e. 0 V, the motor should stop.
    Step 7: Repeat 'Step 2' to 'Step 6' 3 times.
    Step 8: Reset motor postion.
    Till now I have managed to get the motor to move forward n backward @ a desired vel, accl, n deceleration for 3 cycles. I am attaching my code. I am having problem inserting the code for reading DAQmx amidst all this. Can anyone help me out.
    Thnks,
    Sasi.
    Solved!
    Go to Solution.
    Attachments:
    Test_012609.vi ‏35 KB

    Hi Sasidhar,
    I took a look at your problem and I think I have a workable solution for you.  I definitely agree with Lynn's suggestion of using parallel loops.  This will allow the DAQmx portion to run uninhibited by the motion portion, and vice versa.  Plus, you only need to iterate the motion loop whenever the voltage level crosses a threshold.  So, by iterating on the motion code in the same loop that you are iterating on DAQmx code, you are essentially wasting processor.
    I created a VI that should do what you are wanting.  I tested it out myself and it works great.  You might have a tweak a few things to apply to your system (like motion board ID and DAQmx physical channel, etc.).  I used two parallel loops and event-based programming.  Basically the motion loop starts the motor spinning at the specified velocity.  Once the motor is spinning, it waits for the DAQmx loop to tell it that the voltage value has crossed the threshold.  When the voltage value exceeds the maximum threshold (which I set to a value slightly less than 10 to allow for jitter and saturation), the DAQmx loop signals the motion loop that it can finish its iteration.  The motion loop stops the motion, reverses the direction, and starts the motion again.  Once motion has started, it again waits for the DAQmx loop to tell it that a threshold has occurred, but this time, it is looking for a minimum threshold.  I used "Occurrences" to implement the event-based programming in LabVIEW.
    I have commented the code rather thouroughly, so hopefully the comments will answer any remaining questions.  The benefit of using event-based programming for this is that you save processor time, and your motion is more closely synchonized with the DAQmx.  Instead of iterating the motion loop as fast as you can, checking for updates each time, you just pause it, and wait for the other loop to tell you when to start up again.  In the mean time, the processor doesn't have to worry about iterating that loop over and over again.  Also, when the occurrence does occur, you catch it immediately, instead of having to wait until the next iteration.  Thus, you are more closely synchronized with the DAQmx portion of the code.
    I hope this will help you.  Please post back if you have any questions about the code or its implementation.  Good Luck!
    Message Edited by Wes P on 02-03-2009 05:18 PM
    Wes P
    Certified LabVIEW Developer
    Attachments:
    Motion and DAQ.vi ‏59 KB
    DAQmx Loop.png ‏24 KB
    Motion Loop.png ‏17 KB

  • Need help with Labview code for DAQmx

    I'm currently trying to write Labview code for some thesis research and am having problems.  I'm using the cDAQ 9172 with strain gage modules and two voltage input modules.  I'll be reading/recording a voltage from an external source on one channel, while recording strains and accelerations with the other channels.  I need to do all this simultaneously.
    Everything I've done to this point has been in SignalExpress so I'm not sure how to program any of this.  I also need to be able to calibrate the strain gages prior to each set of recordings.  Any help you guys could offer would be greatly appreciated.  Thanks.

    Hi,
    I'm not sure how much this will help you, but I've attached a screen dump of code from a project I did that sounds pretty similar to what you're working on. The code is from a subVI that I used to create the daqMX measurement task for my data acquisition. I was also using a 9172. This was written in 8.5, but the only thing that you may not have access to is the functions for null offset and shunt cal of the strain gage channels. Hopefully this will at least get you started on your way to setting this up.
    Andrew Carollo
    Attachments:
    create task.jpg ‏208 KB

  • Code written for LabView 6 cannot find SubVIs when run in LabView 2013

    I am reworking some code that was originally written for LabView 6.1
    There are quite a few SubVIs that the program was not able to locate when I launched the main VI:
    AI Config
    AI Start
    AI Clear
    DIO Clear
    Continuous Pulse
    Counter Start
    Counter Stop
    quite a bit more.
    In searching the NI site for these, I come across articles referring to these SubVIs so I am wondering if this is something I am missing OR something that was renamed in later versions of labView.
    Any guidance?

    Those vi's are from the traditional DAQ(Legacy)  palettes.  DAQmx has surplanted traditional DAQ.  (Years ago!)
    You should strongly consider migrating the legacy program to modern methodologies using DAQmx- it is well worth the small investment.
    See Also
    DAQmx FAQs
    and Transitioning DAQ to DAQmx
    Jeff

  • I Seek code for programming lego minstorm with labview

    Hi,
    I'am building a car with lego mindstorm for a project and i seek code for programming my car with labview. If you already use labview for programming lego mindstorm, can you send exemples codes for see how the car do for move or turn. please.
    Thanks 

    duplicate post
    duplicate post
    Please try to keep your question to one thread. Otherwise people don't know where to respond. 

Maybe you are looking for