Programming PXI Applikation

Hello,
I´m trying to programm an application on a PXI. I have an host computer whit labview 8.01 an a pxi system running with labview rt. First something about my measurement.
I want to acquire four voltages with samplerate about 50kHz. I´m using two torque sensor which have an output from +-10V an 2 Sensor which measure an axial force.
Parallel to the analog voltages i want to measure two rotation speeds with two counters.
What i want to do is to calculate the efficieny of a cogwheel gearbox.
Because i cannot measure the frequency of the incremtal sensor which measure the rotation speed with 50kHz, i´m waiting for 500 samples of the analog values and measure the average of rotation speed in these 10ms. The efficiency is calculatet by (Torque_driveside*speed_driveside)/(Torque_drivetrain*speed*drivetrain)
I don´t know much about programming an realtime application on pxi systems. And i don´t know what kind of design pattern i should use. Besides the measurement i want to control the drifty engine and a torque on the drive side with an brake.
finally i want to have some kind of data sheet with my measured values. i don´t want to calculate the average of the analog values. i want to use the average of the rotation speed vor every 500 sample array.
my hardware:
ni-pxi-8095 embedded controller
ni-pxi-6602 timer/counter
ni-pxi-6229 multi I/O
ni-pxi-1031 pxi chassis
i hope it is a little bit clear what i want to do. i´m happy about every help i can get!
johannes

Hey Jyang,
Did you get up and running?  You don't need any HW to place NI-Switch VIs onto the block diagram.  It sounds like the NI-Switch driver isn't installed properly; I recommend reinstalling the driver.  Let us know if you're still having issues using the driver and we can continue the conversation.  Happy clicking!
-John Sullivan
Analog Engineer

Similar Messages

  • Teststand

    I'm using Labview to program pxi-2569 switch module to be integrated into Teststand sequence. In one step of the Teststand sequence, I want to close a couple of relays to route voltage signal to DMM. At the next sequence step, I will measure voltages using DMM, and then at the following step, I will open the relays to prepare for subsequent tests.
    The problem is that after the closing-relay VI session ends, all closed relays will be reset to open automatically. we know PXI-2569 use latching armature relays, that means if a relay is closed, it will remain close until we send a open command to it. It seems PXI-2569 relays will remain closed in just one VI run session, all relays will be open when a VI run session ends.
    Or I have to group the relay control codes into DMM measurement VI? Can I make independent switch control VIs that are seperated from other VIs to make my VIs more modular, and easier to duplicate?
    Thanks,
    BLi
    my email: [email protected]

    Hi,
    The problem is due to the initialization VI that will default reset relays to open position. If the default reset choice is 'false', the relays will remain closed.
    Thanks,
    BLi

  • SetAsyncTimerAttribute ASYNC_ATTR_INTERVAL fails to reset timer on Real-time system

    The interval timer does not get reset when using a timer created in a real-time program (PXI chassis using NewAsyncTimerWithPriority).  It works correctly on a non real-time system (Windows 7 Laptop using NewAsyncTimer).
    Example of problem:
    timer is set to 20 seconds (NewAsyncTimerWithPriority)
    wait 15 seconds
    timer interval is set to 30 seconds (SetAsyncTimerAttribute ASYNC_ATTR_INTERVAL)
    timer fires 5 seconds later instead of 30 seconds
    GetAsyncTimerAttribute returns the correct value as if it worked properly.  Note that the timer fires every 30 seconds after the early firing in step 4.  It appears that changing the interval on a real-time system does not reset the timer as stated in the help file "If the timer has already started, setting ASYNC_ATTR_INTERVAL resets the timer."
    Am I doing something wrong?  Has anyone seen this problem?
    Using: LabWindows/CVI 2012, Real-time module 2012.
    Also installed: LabView 2012, Real-time module 2012, FPGA module 2012.
    Thanks.

    Hi Moxcoak,
    You are right this is a known issue, the async timer does not reset properly in a RT system from CVI. We have already filed a bug report on it (#387902) and I will add your service request to that corrective action report to hopefully push it to be resolved faster. Meanwhile, I will try to find the best workaround for you. One option is to set a flag with the communication thread and check it with another asynchronous thread. I will get back to you with the details on how to implement that, but it would depend on your setup.
    Regards,
    Basil Beirouti
    Applications Engineering
    National Instruments
    Regards,
    Basil
    Applications Engineering
    National Instruments

  • Diploma-thesis

    Hi!
    I search an Idee like programming an Applikation with Web Dynpro ABAP for Diploma-thesis. 
    could you help me.
    best regards
    Adil

    Hello Adil,
    the question isn't relevant to the topic. I think it's no good style to go out and simply ask for an idea if you don't even know which module you want to focus on!
    If you're new to Webdynpro ABAP (or even SAP development concepts in general) you will most likely need a contact person that will help you evaluate the topic and guide you all the way to your thesis.
    You should ask at your university or local companies if they are currently looking for students doing their thesis. You can even try to contact SAP directly for this (see [here|http://www.sap.com/germany/about/karriere/studierende/diplomanden.epx]).
    Best regards,
    Alej

  • Session handle with PXI2503

    Hello
    I have created DLLs with Labwindows 7.0 on windows 2000 operating system. Those DLLs are used by another application developped with Powerbuilder software. I use this application to program PXI materials: MXI3 kit, PXI-1042 chassis, PXI2503, PXI6527 and PXI-GPIB. With my user profile, I can program those materials through the application I have implemented. The other users can't program PXI materials with my application. This application uses niSwitch_init function. When the application encounters this function, it can't establish a session handle. The session value is zero and the returned status code is BFFFA002B. Programming directly the PXI2503 card with NI examples woks with everybody.
    I would like to know if there is a link between user profile and programming PXI materials.
    Is there any solution to my problem?

    Hi,
    I answered a similar question on another thread in french.
    Actually, it is not usefull to duplicate questions (french & english) on the forum.
    Thanks in advance for that,
    Regards,
    David D.

  • Problem of connection while running a program on PXI

    Often, when I use a Labview program running on PXI, I lose the connection with PXI and have to stop my program and reboot PXI.
    It's happens with heavy program using a lot of IO port, but also some very basic and light program. Have you ever had this kind of problem ? Do you think it comes from PXI or from my laptop (which is quite powerfull however), or the cross cable which links both ?
    thanks for your help.

    Hello Foxone,
    Can you please give us more details about your system?
    Which PXI you use? Which devices?
    Do you receive any error message?
    Regards,
    Sanaa T
    National Instruments
    Sanaa T.
    National Instruments France
    #adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
    >> http://www.nidays.fr/images/081110_ban_nidays09_468X60.gif

  • Object oriented programming on PXI-System

    Greetings,
    i've developed some object-oriented LV classes, wich i've succesfully tested on my desktop pc. The next step would have been to test them on a PXI-controller. However, the LV 8.20 methods of object oriented programming seam to be incompatible to PXI-systems.
    All i'm getting is an broken arrow with an error message like that
    HardwareIOAnalog.lv.class:setTimingNP.vi
    Frontpanel-Anschluss 'HardwareIOAnalog in': Der Typ wird für das aktuelle Ziel nicht unterstützt (means: Type not supported by current target)
    Does that mean that object-oriented design is not supported in general by PXI, or is it depending on the type of the PXI-System. Is there an easy way around, or do i have to re-program all my classes to conventional (Sub)VIs?
    Help appriciated! ;-)
    Regards,
    Bennet Gedan
    Student (Electrical Engineering/Mechatronics)
    Darmstadt University of Technology
    Bennet Gedan
    Student (Electrical Engineering / Mechatronics)
    Darmstadt University of Technology

    Okay, thanks. Meanwhile I reprogramed the whole thing and set OOP aside (at least on the PXI-Target). It's a pity to loose some advantages of OOP, but it brougth me some interesting new programing techniques i could transfer to non OOP stuff.
    Regards,
    Bennet Gedan
    Student (Electrical Engineering / Mechatronics)
    Darmstadt University of Technology

  • A Programming problem with PXI 8461

      I use PXI-8461 CAN Card.
      The subvi READ_AI's function is to aquire data,and save datas to database.
      And Process.vi dynamicly calls READ_AI twice,and a Main.vi calls Process.vi for every step.
      Every step lasts 10 seconds,and has 10 seconds interval.
      step1: from 0s->10s, aquire data;
             delay 10s;
      step2: from 20s->30s,aquire data;
      I find that ,step2's data is from 10s->30s!
      What is the problem ? Is there any error in CAN's use ?
      Here is my vi. thank you.
    Attachments:
    READ_AI.vi ‏80 KB
    Process.vi ‏44 KB

    It displayed that error message because it reached the end of the file before your program was complete. For example, remember when last Thursday when you
    Hey, did you notice how the last sentence up there just stopped before the sentence was really done? Your program does the same thing.
    Read some tutorials about Java; they'll have plenty of examples of complete programs.

  • "Waiting for real-time target (RT PXI target) to respond" error when the program waits interrupts

    Hi there,
    I have developed an application to detect interrupts generated by a electronic card and act in consequence. The program has been developed in labview but it calls a dll; that was created with labwindows. The dll is programmed to open the visa communication, enable events and install the interrupt handler and when an interrupt is detected, it reads the value of the different registers of the card and returns it to labview to visualize them. 
    The problem is that when the program waits for an interrupt, a prompt appears with the message "Waiting for real-time target (RT PXI target) to respond" and the only option I have is to click on the button to disconnect from the pxi or just wait. If I wait and I generate an interrupt, the prompt disappears and the application visualize the data like it was expected. 
    To wait for the interrupt the following code has been programmed in the function:
                    while (flag == 0)
                                    Sleep (1000);
    When an interrupt occurs, the value of flag changes to 1 and the function continue without any problem. I am not really sure, but probably here is the problem and probably this is not the best way to wait for an interrupt because the sleep function suspends the thread for the configured time, but at least the computing load in the PXI is between 0% and 1%. I was wondering if somebody knows how to wait for an interrupt without "lost" the communication with the PXI and if there is a better way to do it. 
    Any answer will be welcome and thanks for them,
    Jaime
    Solved!
    Go to Solution.

    Hello Naity,
    First of all, in which thread runs the waiting process? Is it scheduled in another thread than the function setting the flag?
    It scheduled in the same thread that I use to configure the communications and configure the card. Anyway, here is the pseudo code of the function interrupt that I programmed under labwindows,.
    char* interrupt(void)
    1. Open visa communications
    2.Install handler interrupt --> status = viInstallHandler (instr, VI_EVENT_PXI_INTR, IntrHandler, VI_NULL);   // the function IntrHandler will be called when an interrupt occurs
    3. Enable event PXI interrupt
    4. Wait
    while (flag == 0)
                  Sleep (1000);
    5. Visualize the data coming from the interrupt (registers and values measured with the card)
    6. Uninstall handler interrupt
    7. Close visa session
    The interrupt handler function IntrHandler is called immediately when an interrupt occurs and the pseudo code is like this
    ViStatus _VI_FUNCH IntrHandler(ViSession instr, ViEventType etype, ViEvent event, ViAddr userhandle)
    1. Disable some functions of the card to avoid damages. 
    2. Read registers and put them in a buffer
    3. Change the value of flag ---> flag = 1;
    In labview, I call the function interrupt with a call library function node (see the capture attached) and the program reads and saves the data from returned from the function.
    Secondly, I am not sure this method is the most elegant. You could for example register an event with the function and, insteand of setting a flag to 1, trigger the event and schedule it in another thread (if the function is thread safe). This could reduce your CPU Load even more and seem a bit cleaner to me.
    I've never used events before in labwindows but I will try to do it in this way. But anyway, I suppose that I should; somehow, wait the event to occurs in labview while the waiting for the event is programmed inside the dll...and probably the same prompt that i am trying to avoid is going to appear again, because I am not returning the "control" to labview (I mean, labview executes the dll and waits for the event to occur. Then the execution of the labview program is stopped in the call library function node executing the dll)
    Third point, which environment of development are you using?
    I am working with LV 2010 sp1 and Labwindows cv 10.0.1 and with the real time module.
    I did also another test, I divided the program in different functions, one to initialize the communication, another to wait until a interrupt has been detected and the other to obtain the data from the interrupt and close communications. With labview I call first with the call library function node the function to initialize, later I call inside a while loop the wait function like this
    int waitAseconds (double seconds, short stop_waiting)
    if(flag==1 || stop_waiting == 1)
    flag = 1; //to detect the stop_waiting button
    printf("flagAA =1 stop waiting = %d time = %d\n", stop_waiting, clock());
    return flag;
    else
    SleepUS(seconds*1000000);
    //a++;
    printf("flag a= %d stop waiting = %d time = %d\n", flag, stop_waiting, clock());
    return flag;
     and when the program detects an interrupt, the function returns to labview the flag and stops the loop. Finally, it reads the values and close communications. 
    In this way, the prompt appears but after running the application for 10 or 20 minutes and also i checked that there is a time gap between the executions in the loop.
    Thanks for your reply and your help,
    Jaime
    Attachments:
    capture.png ‏40 KB

  • In begining PXI session run program like RESMAN in VXI session or the open must bw a part of DLL?

    I am wriitng a DLL for a new PCI device and it was possible that in on e chassis will be more that one device hoe the user will pass to DLL in wirch device the command it?( this is my first expereince with PXI and PCI programming) the device is a passive device (no CPU in the device)

    FP:
    I think you are asking one of 2 possible questions and I'll try to answer them both.
    The first is how to find any existing board of a given model. Each PCI or PXI module will have its own model code, just as in VXI. You can do a search with viFindRsrc with "PXI?*INSTR{VI_ATTR_MANF_ID == 0x1234 && VI_ATTR_MODEL_CODE == 0x5678}". If there is only 1 in the system, the output string is what you want.
    If there are more than 1 of the exact same type of device in the system, that query will not suffice because it will return all of them. The way to distinguish them then is to use the device number, which is similar perhaps to the VXI logical address. 2 devices next to each other might have addresses like "PXI0::15::INSTR" and "PXI0::14::INSTR". These numbers
    are related to the slot but are not quite the same as the slot. The 3 unique numbers in PXI are bus (often 0 for a small PXI chassis), device, and function (0 for most devices, required only for multifunction devices). The resource string uses them as "PXI::::::INSTR".
    Dan Mondrik
    Senior Software Engineer, VISA
    National Instruments

  • How can I communicate PXI-6509 by Static DIO Register-Level Programming?

    - How can I communicate PXI-6509 by Static DIO Register-Level Programming?
      PXI-6509 physically Port0 is connected to Port1.
      For checking all connections are correct for this case so I have used DAQmx Test Panel. Just in case everything is ok.
      In this case I interested in to communicate the PXI6509 by Register-Level Programming.  
      I have tried to use Open VISA Test Panel for sending and reading data (in MAX explorer) and
      use NI-Spy for checking communication data.
      The first step I configured Port0 to Outputs state and Port1 to Inputs state.
      The second step I setup Port0 to 0xAA.
      The third step I read back Port1 and expected data will be 0xAA but just only 0x0. Why???
       1              ViOut8(0x03D83318, 10, 0x00000041, 1)

    Hello!
    We don't do support on register-level programming but the problem you are experiencing might be due to tri-state on the ports?
    Please check this manual that covers register programming of the device you are using:
    http://digital.ni.com/manuals.nsf/websearch/47300C3471742AD0862570AE005E0AD1
    Regards,
    Jimmie Adolph
    Systems Engineer Manager, National Instruments Northern Region
    Bring Me The Horizon - Sempiternal

  • Solutions to program a PXIe - 6555

    Hi there,
    We are working with a PXIe - 1075 as chassis and we are focusing on the PXI - 6555 module whom is basically an 200 Hz I/O with PPMU. Our goal is to program labview in such a way that we can use properly the PXI - 6555 as an I/O device.
    For now, we've managed to interact with MAX and so to aquire the basics (the signal) and we were wondering how to program if we wanted to imput our own signal (our own frequency and so on ...).
    Other question : can we program each I/O seperatly (DDC) in order to generate signal and read them on other .
    Thank you,
    Alexandre Mercier
    Research studend at the University of Windsor
    Ontario, Canada

    Hi Alexandre,
    You can perform the tasks that you would like to use the board for, but the "how" will vary based on what you are trying to do.
    I would suggest looking at the 6555 specifications to make sure you understand the hardware limitations as far as current/voltage protection and maximum limits, as well as accuracy calcuations.
    Next, I would review the HSDIO Help that we put in a .chm for relevant information on the programming interface that you have and how to use it. There is also a ton of helpful information there about the board and its features.
    Once you've become a little bit more familiar with your documentation, I'd navigate to the Example Finder that is built into LabVIEW and look for relevant examples that the HSDIO driver ships with. You can find many examples of the software flow used to program the board and various modes that it can operate in. This should give you the best starting point for configuring the onboard clock frequency, reading/writing from DIO lines, etc.
    With those two documents and your examples on hand, you should have more than enough to get started and use the board. You can start looking at examples first if you'd like, then look back at the help to identify the VI's used and their purpose. 
    Kyle A.
    National Instruments
    High Speed Digital I/O Product Support Engineer - R&D

  • Is there any DDK, RLP or examples programming Relay cards PXI-2567?

    I am trying to write a Device Driver for PXI-2568 Relay card. I can not find any Device Driver Kit (DDK) or Register level Programming (RLP) information. I program in Visual studio C++ using RTX. I have diver for M and E series ADC cards as well as DIO cards, but can not find any help for the relay cards. Where can I find any examples or other info?
    Thanks,
    Tony

    Hi Tony,
    I have RLP information on the PXI-2568, but the information is limited and may not give you all the desired functionality that you're looking for.  If possible, can you provide me an email address to contact you personally?  Because the information is somewhat limited, additional support may be required, so I would rather not make the RLP manual public.  Also, I would like to discuss the caveats to the existing RLP manual and verify the information I have will make you successful.  Please note the email address you provide will be public information (at least initially), so you may not want to use your primary email address.
    Another option is requesting support through phone or email via http://www.ni.com/support/, however phone and email requests require a valid service contract.
    Thanks in advance!
    Chad Erickson
    Switch Product Support Engineer
    NI - USA

  • How could I control PXI-2567 from my C/C++ program?

    I need to control the PXI-2567 relay driver from inside my C/C++ programs.
    How could I do this, is there a dl, com, or something?
    Please tell me if there are any integration documents or user manuals for using whichever method if any.

    Hi BSA,
           You'll want to utilize the NI Switch Driver, which will install both example programs and the NI Switches Help.   There is a Function Reference Section in the NI Switches Help (which is installed with the NI Switch driver, and as well can be found on our website).  Example programs will be installed on your computer under Start»All Programs»National Instruments»NI-SWITCH»Examples»C .  You can also program your switch with2567 with DAQmx.  The differences between the two drivers can be found in this KB.  As well, additional resources for your switch are discussed here. 
    aNItaB
    Applications Engineer
    National Instruments
    Digital Multimeters

  • Program identifies the pxi chassis

    I have a utility in Lab Windows CVI 2012 that runs on a PC, PXI or PXIe. I would like the program to be able to identify which of these it is running on.
    Right now we have a read of a device in the PXI chassis, just initialize a switch card, if it is successful, we have the PXI or the PXIe. My concern is if that one card is not present, also this results in a run time error if the card is not there, or if it is a PC.
    I would really like something to read directly from the PXi, a serial or device number or something. Sort of like we have in our code to read the type of CAN device, first we get the CAN device number, then the device type:
    /* find "can_num" for NI CAN device (just not USB) */
    Status = ncGetHardwareInfo(can_num, 1, NC_ATTR_HW_FORMFACTOR, 4, port_check);
    /* use "can_num" from PCI, PXI, or PCMCIA Device to get port number */
    Status = ncGetHardwareInfo(can_num, 1, NC_ATTR_INTERFACE_NUM, 4, port_check);
    Is there any such function to read the PXI chassis?

    Hi Ken-this-..., 
    I think what you want is DAQmxGetDeviceAttribute().  Here is a link to a similar post:
    http://forums.ni.com/t5/LabWindows-CVI/How-to-detect-PXI-chassis-cards-and-their-serial-numbers-in-C...
    Peter T
    Applications Engineer
    National Instruments

Maybe you are looking for

  • Can't get MP4 Video to import

    These are the specs on a video file on my computer recorded off of a JVC GY-HM 100U. I can't get it to import into FCPX, and it wont' import into Compressor. What is apple's official stance on what to do with these files? What is the easiest way to g

  • No Images in Viewer

    Hi, I have Aperture 3.2.  Suddenly I can't see images in the main viewer.  The viewer is just grey (i.e. background color).  I can see the images in the browser and in the filmstrip area of the split view.  Any ideas what's wrong? Thanks, Robert

  • Hyperion Hub Required for External Authentication?

    Need to use external authentication for three products, Essbase 7.1.2, Analyzer and Reports. Do you have to use Hyperion Hub?

  • Can you unprotect a protected aac file?

    Hi all. Some albums on my mini just cycle through all the songs without playing any. I looked into "get info" and the ones that do that all have "proteced aac file" in their information. How do I unprotect , or at lesat get my mini to play these song

  • Data retrival from XML nodes

    Hello all I have a xml file somthing like this - <lbs-server> - <location-results> - <error> <number>12</number> <information>Invalid credentials</information> <system method="NULL" /> </error> </location-results> - <server-time> <date>13</date> <mon