Inverted Outputs using DAQMX

We have been using traditional daq with an SCXI 1163.  We have an interface that uses an inverted digital output on odd channels.  Using traditonal DAQ we could set any of the bits to be inverted in the properties.  Using DAQMX it looks like you can only set them to all inverted or not and not able to set individual bits.

Sorry for the late response was on vacation and then at NI Week.
We have custom cards in our test systems that have logic driven by the SCXI 1163.  In the test mode we select two bits one inverted and the other non inverted (ie channel 0 and 1).  This allows us to read voltages and currents from our test systems by using the the test parameters of an SCXI 1102 in test mode using MAX.  The following screen shot is from the Traditional DAQ properties which allows you to set the bits to invert.  In DAQmx there is only one selection that allows you to invert all but not on an individual basis.  This prevents us from converting to DAQmx.  Hope this all makes sense.

Similar Messages

  • Multiple inputs and outputs using DAQmx VIs

    Hello,
    I am fairly new with the LabView programming language.  I have a few training books that I have been reading, and I have been following online tutorials and reading the forums.  However, I have come to a problem where I don’t see a clear solution.  I am using LabView 2009 (9.0f3) and DAQmx VIs.
    I am using a NI 9172 chassis PLC, with two 9201 AI cards, 9217 AI RTD card, 9472 DO card, 9263 AO card, and two 9237 AI Bridge cards.
    I am reading eight analog inputs with the 9201 cards, two analog RTD inputs with the 9217 card, three digital outputs with the 9472 card, three analog outputs with the 9263, and eight analog inputs with the 9237 cards.
    I wrote a simple program to test one digital output task, two of the analog output tasks, and a single analog input task.  I put all of them in the same while loop, and it worked perfectly.  However, when I add analog input tasks to the same loop, I get an error 200022.    So I tested each sensor individually by changing the channel before each run.  I searched error 200022 and found that this is because I cannot start another analog input task until the previous one ends.  With this said, I don’t know how to acquire an analog voltage in the same task as an analog RTD voltage.  Both inputs take different constants in the start task DAQmx icon.
    Attached is my test program.  It is titled “Test All”. This is the program I used to test the various sensors.  I tested the input sensors one at a time, and it worked fine.  A few tasks are written just to test functionality, and will be added to later.  The data is only displayed on the screen.  I will add triggers and data write to disk functions later.  This program works now, but if I add more analog inputs, it will generate the 200022 error.
    Can someone show me how to correctly write the code for multiple inputs and outputs using DAQmx?  All training materials and tutorials I can find all show a single input or single output, not multiples of each.  Thanks for looking.
    -Randy
    Attachments:
    TestAll-NI.vi ‏32 KB

    Hi RandyC,
    The Knowledge Base article Using Different Types of DAQmx Global Channels in the Same Task goes into a little more depth of what Bryan is talking about, and it also includes some example code to help show what to do.
    Hope that helps,

  • How to use a Time - Voltage Array to Control a Analog Voltage Output using DAQmx Write VI

    I have an array of Time values associate with Voltage values that I want to use to control a Anolog Votage Out Device (PXI-6251) using DAQmx.  The array contains 1,000 elements.  The time values are NOT evenly spaced, the rate changes through the array.  The array is output once, timed to other processes.
    My problem is I haven't been able to locate a reference on how to handle the timing variability in the array.  If time was equally spaced I could use a loop....
    The attached showes the array, first row is time (ms) and the second row is voltage (volts).
    Can someone point me in the right direction?
    David
    Attachments:
    TimeVoltage.png ‏11 KB

    David,
    if you have only Base version of LabVIEW, this will be a time consuming task.
    If you have either Full or Professional, you will find interpolation-functions in the mathematic palette.
    I am not sure which ones serves you best,  but i'd startexperimenting with Interpolate 2D.
    hope this helps,
    Norbert 
    [Edit]: You could also use a polynominal fit on your voltage values. You will get a function describing the voltage over time. But you will have to modify this function to take care of the variation of time spacing. If you have a function describing your voltage over your (nonconstant) timestamps, you can simply create values for constant timeslices for your voltage.
    Message Edited by Norbert B on 11-06-2008 10:21 AM
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • I want to open a txt file and output data through an AO-using DAQmx for PXI

    I have a PXI running a 8145RT CPU. I have a PX6040E Multifunction DAQ card installed in the PXI. I want to program an application where I open a txt file (existing in one of the the RT machines' folders), read the first row, and output its data through an AO channel. The drivers I should use is DAQmx v7.1, and the Labview RT v.7
    Any idea?

    What exactly are you having problems with? Reading a text file can be done a number of ways. Look at the File I/O palette and check out Read Lines From File or Read Characters From File. There are string to number conversion functions on the string palette (i.e. Scan From String). There are also numberous shipping examples on using DAQmx for analog out. If you have a specific problem or question, please post back with additional details.

  • How do I use daqmx to get encoder direction/count on E-series board?

    Hardware:
    PCI-6014
    Labview 7.1
    I have a linear actuator and wish to get distance/direction.  The
    motor has a quad encoder with phase A and B only.  I connected the
    lines according the the E-series, PFI-8 and PFI-6, and ground to
    digital ground. I then attempted to design a control with daqmx but
    failed.  I have tried the daqmx examples but none were attempting
    a reverse in direction.  Most examples given for direction change
    are for traditional daq control; i cant make a correlation on what to
    use to substite traditional daq with daqmx vi's. 
    2 questions:
    How do I use daqmx to get encoder direction/count on E-series board?
    Are there low pass filter vi's recommended for each phase connection to stabilize data?
    Thanks,
    Wayne Hilburn

    Hello Wayne,
    Take a look at the Count Digital Events.vi shipping example.  You can find this in LabVIEW by selecting Help >> Find Examples... then browsing to Hardware Input and Output >> DAQmx >> Counter Measurements >> Count Digital Events.
    If you set the "Count Direction" control to "Externally Controlled", you will be able to count up and down depending on which direction you rotate your encoder.  Make sure you wire Phase A to Ctr0 Source and Phase B to P0.6.  P0.6 is the up/down line for counter 0.
    I hope this helps.  Please let me know if you have any further questions.
    Regards,
    Sean C.

  • How can I get properties of global virtual channels using DAQmx?

    I'm using DAQmx with VB6. In my app, I would like to be able to present the user with a list of available predefined channels to select from. I can use DAQmxGetSysGlobalChans to get a list of the channels, but I need a way to sort out which of these channels are defined as inputs, and which are outputs. It would also be nice to be able to query other properties of the virtual channel (for example, the device and physical channel being used). These all seem very simple things, but I haven't found anything like this in the documentation so far.
    Thanks.

    Try using  DAQmxGetChanType(TaskHandle taskHandle, const char channel[ ], int32 *data)DAQmxGetChanType(TaskHandle taskHandle, const char channel[ ], int32 *data).  This will return one of the following types:
    DAQmx_Val_AI
    10100
    Analog input channel.
    DAQmx_Val_AO
    10102
    Analog output channel.
    DAQmx_Val_DI
    10151
    Digital input channel.
    DAQmx_Val_DO
    10153
    Digital output channel.
    DAQmx_Val_CI
    10131
    Counter input channel.
    DAQmx_Val_CO
    10132
    Counter output channel.
    Let me know if this works. 
    Regards,
    L. Allen

  • How do I configure a counter to generate pulses using DAQmx?

    How do I configure a counter to generate pulses using DAQmx?
    Is says in the DAQmx C reference help
    "CtrnInternalOutput—The signal at this internal terminal is where the pulsed or toggled output of the counter appears. The output of a counter pulses or toggles when the counter reaches terminal count. When counting down, the counter reaches terminal count when the count reaches zero. When counting up, the counter reaches terminal count when the counter rolls over. To configure the counter to toggle or generate pulses, use the Export Signal function/VI with Counter Output Event as the signal name."
    I've tried this but can't get it to work, I may have the parameters wrong or something. The DAQmxExportSignal() function is very unintuitive to me. Here is my counter config code...
    int ret = 0;
    ret = DAQmxCreateTask("",&task_);
    errorMsg(ret);
    if (ret != 0)
    throw ret;
    // Configure the counter
    ret = DAQmxCreateCOPulseChanTicks( task_, "Dev1/ctr0", "", "/Dev1/PFI8", DAQmx_Val_Low, 0, divider, divider );
    errorMsg(ret);
    ret = DAQmxCfgImplicitTiming( task_, DAQmx_Val_ContSamps, 1000 );
    errorMsg(ret);
    // Change to pulse mode
    ret = DAQmxExportSignal( task_, DAQmx_Val_CounterOutputEvent, "/Dev1/Ctr0InternalOutput" );
    errorMsg(ret);
    // Start the counter
    ret = DAQmxStartTask(task_);
    errorMsg(ret);
    The above code works fine, in toggle mode, if I just comment out the DAQmxExportSignal() part.
    HELP!!!
    Stefan

    The problem is due to the DAQmxExportSignal call.  By default, when you create a counter output pulse train task, the driver will automatically set the output of the counter to toggle when the count for each high ticks and low ticks expire.  The driver also automatically routes the signal present at Ctr0InternalOutput terminal (the output of the counter internal to the device) to the Ctr0Out terminal (the I/O pin available externally).  Using the line
     ret = DAQmxExportSignal( task_, DAQmx_Val_CounterOutputEvent, "/Dev1/Ctr0InternalOutput" );
    will tell the driver to tristate the Ctr0Out terminal and not output the signal to the external I/O pin.  Using the DAQmxExportSignal function is generally only useful if you want to route the signal to some other terminal internal to the board without having the output show up on the external connector, route the signal to some other external pin other than the default pin, or if you want to have the output show up at multiple locations. 
    If you want to change the output behavior from toggle to pulse, you need to use the DAQmxSetExportedCtrOutEventOutputBehavior function.  However, this is generally only useful if all you care about are edges (not the duty cycle of the pulse train), and you want to generate higher frequency signals.  For example, with a 20 MHz timebase as the source of your counter, you can only generate a 5 MHz pulse train by default.  This is because the minimum value for the low and high ticks parameter is 2 (20 MHz / 4 = 5 MHz).  By changing the output behavior form toggle to pulse, you can generate a pulse train at 10 MHz since the output is now pulsing instead of toggling.  However, the width of each pulse is not programmable so you will no longer have a 50% duty cycle signal.  I don't remember exactly what the width of each pulse is, but I believe it's in the neighborhood of 50 - 100 nanoseconds in width.  I hope this information helps.

  • How to configure physical channel using DAQmx block(remote PXI6733)

    I am trying to run the example in labview that use DAQmx. But I find I can't find the physical channel by browser or using DAQ assisstant. It reports "No supported device found". My PXI6733 is on a controller and communicate with host computer by TCP/IP. Could I use DAQmx in such environment? What I should do to find the physical channel?

    Braver,
    The NI 6733 is not yet support by NI-DAQmx. Thus, you will need to use Traditional NI-DAQ to program this device until this support is added. I would suggest that you examine the following Traditional NI-DAQ examples:
    Examples >> Hardware Input and Output >> Traditional DAQ >> Analog Output
    Good luck with your application.
    Spencer S.

  • Pause the counter output in DAQmx

    Hi~
    I used two counters output on PCI-6602 card in LV7.1 to generate a PWM to control the velocity of two motors that control the position of mechanism.(Encoder was set on the motor.)
    When I set the same duty cycle in two counters, the position of two mechanisms were different(Two mechanisms were the same),that means one velocity of motor was fast, the other was slow.
    May I pause the counter output of the fast motor to wait the slow motor??
    ====================
    ●LV Version:LabVIEW7.1
    ●OS:WindowsXP(SP1)
    ●Hardware:PCI-7344, PCI-6602, PCMCIA 6024E

    Assuming you're using DAQmx, you can set up a Pause Trigger for each of the counters.  (A similar function can be done in traditional NI-DAQ too).  You could, for example, configure 2 different digital bits to be used to pause the 2 PWM counters independently.  The way 'Pause Triggering' works is that the counter's pulsetrain only goes to the output pin when the pause trigger signal is in the correct logic state.  This can be set to be low or high by programming. 
    You may also want to characterize the speed difference of your actuators, and give them correspondingly proportional PWM duty cycles.  That would do a better job of keeping them in sync throughout the motion.
    A feedback signal would give you even better options for control.
    -Kevin P.

  • Synchronize buffered pwm outputs on Daqmx

    I'm using Daqmx to produce two synchronized pwm outputs.
    The pwm outputs: 
                a) have variable controllable frequecy, and therefore use buffered data as input to daqmx write vi. and also use 'implicit' as input to clock type in timing vi
                b) have their beginning edges synchronized
    The design I use uses two separate tasks to create the signals. The only way I could think of of synchronizing the pulses was by putting the 'start vi' and 'write vi' in two different sequential frames. The idea doesn't seem to work, the two pulses somehow drift apart on the oscilloscope. Even the start part does not work; there seems to be a delay.
    Since I'm not using any clock to generate the signals (implicit), how can the two pulses be synchronized?

    Hello lvuser111
    You may take a look to this community example, it could give you a good idea how it may be implemented:
    Synchronize Two Counter Output Tasks Using a Dummy AI Task
    Regards
    Mart G

  • Sending Binary using DAQmx

    Hi all,
    I am trying to create a program so that I can enter a number and a given step size and have labview send the digital output to an instrument using DAQmx.  I am working with a machine that reads 15 bit binary (bit 0 - bit 14).  I am able to make the desired binary number with the given step size, the problem I am having is that I am not too familiar with DAQmx and don't know how I should go about sending the corresponding 0 or 1 signal voltage from the correct element of the binary number.  For example if my binary is 100111001110001 i want to send the first pin on my instrument that signal (+5v) and the second pin (0v) and so on.  Should i be making my binary into an array or a string format?  Any input would greatly help out.
    Thanks 

    You should take a look at the shipping example called Write Dig Port. This example sends a U32 number to DAQmx Write. The data to write in the example is displayed as hex but that doesn't make a difference. You don't have to do any conversion. Port0/line0 is the least significant bit, port0/line1 is the next, etc.

  • My VGA output using Mini DisplayPort to VGA doesn't work.

    Since I upgraded to Mavericks, my VGA output using Mini DisplayPort to VGA doesn't work. When I was using Mountain Lion, as soon as you plugged in the Mini adaopter into the mini display port, the screen would shrink and format to where it would project via a RGB cable to a projector. No such luck since Mavericks! Also, I had a lot of trouble with the DVD player when I tried to play a DVD and project it via a projector. It all worked seamlessly with Mountain Lion. Can anyone help me?

    I think if you go to System Preferences >> Displays and Option-click on the "Scaled" radio button, it will show you all of the resolutions that you would have had before under Mountain Lion. I just upgraded to Maverick and my resolution preferences (mirrored on a TV using the Mini DisplayPort to VGA adapter, using 1280x768) were completely reset (my display was no longer mirrored, and the resolution on my main iMac screen became 2560x1440). I found my answer here: https://discussions.apple.com/message/23599645#23599645. Hope that helps.

  • Generate XML output using DBMS_XMLGEN.getxmltype and not from rdf

    Hi,
    I have a requirement to display output from a particular table in XL format. Out of all the known possible options, I am planning to use the XML publisher to generate XL output.
    For the data source, instead of using the conventional way of creating XML data using rdf,I am planning to use DBMS_XMLGEN.getxmltype pl/sql procedure to generate the XML output. And from the output, call the template to generate the required Excel output.
    Now, I am using the following code to generate XML output but am not sure how to proceed from here. I need to first print the XML data in the FND Output file after which I was planning to call the 'XML Report Publisher' (XDOREPPB) program and use the current request id to get the excel output but I am not able to find the way to print the XML data in the output file as:
    fnd_file.put_line (fnd_file.output, l_xml_type); - is throwing an error as l_xml_type is an XML data output.
    PROCEDURE xml_main (
    errbuf OUT VARCHAR2
    ,retcode OUT VARCHAR2
    ,p_project_from IN VARCHAR2
    ,p_project_to IN VARCHAR2
    AS
    l_xml_type XMLTYPE;
    BEGIN
    SELECT DBMS_XMLGEN.getxmltype
    ('SELECT fnd_global.conc_request_id
    ,TO_CHAR (segment1)
    ,to_char(start_date,''MM/DD/RRRR'')
    ,to_char(xxmcc_project_details_pkg.current_profit_projection
    (project_id),''999,999,990.90'')
    ,to_char(xxmcc_project_details_pkg.cost_to_date (project_id),''999,999,990.90'')
    ,''1''
    FROM pa_projects_all
    WHERE segment1 BETWEEN NVL (p_project_from, segment1)
    AND NVL (p_project_to, segment1)')
    INTO l_xml_type
    FROM DUAL;
         fnd_file.put_line (fnd_file.output, l_xml_type);
    END xml_main;
    Can anyone point me as to how to publish XML output using a PL/SQL procedure (DBMS_XMLGEN.getxmltype)
    Thanks.

    Pl see if the example included in this presentation helps http://www.oracle.com/technology/products/applications/Events/OOW-2006/EBS/S281401_Sridhar_Bogelli.pdf
    Also, you do not need to explicitly call XDOREPPB in later versions of XML Publisher. If you set up everything correctly (as described in the presentation above and the link below) the Output Post Processor is called automatically after the XML file is generated successfully.
    Another excellent tutorial is at http://www.oracle.com/technology/obe/fusion_middleware/fusion/bi/xmlp_ebiz/index.html
    HTH
    Srini

  • Editable field in alv tree output using cl_gui_alv_tree

    Hi,
    i need Editable field with F4 help in alv tree output using cl_gui_alv_tree.
    regards,
    Naresh

    sadly, this is not possible. An ALV Tree cannot by editable.
    Regards

  • Is it possible to display a date as (DD-MON-YYYY) in excel output using excel template in xml publisher

    Is it possible to display a date as (DD-MON-YYYY) in excel output using excel template in xml publisher where date should be displayed as date only not string.

    I've tried to use hierarchy node variables, but it seems like you can't specify a attribute of the hierarchy such as level.  So with the WBS hierarchy, if you create a hierarchy node variable, you specify the WBS value to select (If I understand this correctly).  I wish I could instead specify "give me all the WBS nodes that happen to have the value of the level attribute greater or equal to 3.  If I understand Juergens post, he is saying make security access so that only certain WBS levels can be returned in the query.  I suppose we can try that, but that would then preclude getting the level 1 and 2 in the future if the authorization is global.

Maybe you are looking for