X series DDK digital output

I have been working on the X series DDK digital output example dioex1.cpp. It seems working but not exactly what I expected. I have set it up for digital output and sent out the value on specific bit (pin) in dioex1.cpp and I did see the pin turned ON. However, it didn't hold ON all the time instead of toggling the bit On/Off all the time.
Any ideas why ?  Thanks.
Larry

Hello,
Exactly what behavior are you seeing?
The expected behavior of the example is that it resets the dio subsystem, briefly outputs the expected state, and then resets the dio subsystem back to the default state as the application exits.  If you want the outputs to remain set after running the example, you can set the tristateOnExit to kFalse instead of kTrue.  However, when the example is run again, it will briefly reset the dio subsystem before outputting the next state that you want.
I would recommend creating a loop in the example so that it doesn't exit until it receives input to exit (and resetting the dio subsystem of the board).  This would make the output stay on the port as long as you need it there.
I hope this helps,
Steven T.

Similar Messages

  • How do I calculate 'uptime' of a digital output

    Hi everybody,
    I'm new to these forums and I am currently evaluating Labview for a series of lab tests where we measure energy balance in a chemical reaction. I've already 
    I have a USB 6008 wired to a relay drive (thanks to these forums) and a heating element and I want to measure the total time heating element is 'on' during 24 hours to calculate the energy the system is getting. The heating element switches on and off based on the signal of a thermocouple.  Is there an easy way to measure the seconds that the output port wire to the heating element is active? Device-independent would be preferable (like measuring the signal uptime of the input of the digital output of the USB6008)
    I tried a lot of options today, like while loops, sequences, case structures following several postings here but all of them failed miserably - while the problem sounds so easy. I could easily do it in the hardware by wiring the output of the relay drive to a bauser timer, but that would be giving up too soon
    Any help would be appreciated.
    Best regards,
    Dimitri

    Hi Dimitri,
    Welcome to the NI Forums! It's good to hear that you've already received some help here.
    Q: Is there an easy way to measure the seconds that the output port wire to the heating element is active? 
    A: Yes! The method we can use to perform this action depends on the sort of architecture that you're using at the moment, however we can take advantage of the section of your code which defines whether the line should be on or off. When it's on, using a While Loop we can  use a Timestamp to keep track of the current System clock; this Timestamp will update on every loop iteration. If we use a reference Timestamp which is created outside of the While Loop when we first begin to drive the line high, we can simply work out the difference between the current Timestamp and the reference Timestamp to get the total time.
    This kind of code will also be device independant because it relies only on the computer it is used on.
    I hope this helps!
    Alex Thomas, University of Manchester School of EEE LabVIEW Ambassador (CLAD)

  • X Series DDK: Configure Interrupt on DMA Channel's total transfer count

    Hello,
    In the DAQ-STC3 X Series DDK Reference Manual, Chapter 1: Theroy of Operation, Section Interrupts, Subsection Special Considerations: Maximizing Throughput in Low-Latency Situations (p41), it is said:
    "for X Series devices, the CHInCh can interrupt on the DMA channel’s total transfer count, which occurs once the data has been completely transferred to the host memory. The order of programming for this situation (and output operations) is as follows:
    1. Program the DMA channel’s Total_Transfer_Count_Compare_Register (CHTTCCR) with the number of Bytes in a single input/output sample.
    2. Set the DMA channel’s Notify on Total Count flag in the CHCR.
    3. Set the DMA channel’s Arm Total Count Interrupt flag in the CHOR.
    4. Start data transfer (through the DMA controller and the subsystem’s Stream Circuit).
    5. Receive total transfer count interrupt.
    6. Increase the CHTTCCR by the number of Bytes in a single input/output sample.
    7. Re-arm the total transfer count interrupt in the CHOR.
    Using the X Series DDK, I don't manage to perform such a configuration.
    Can you please provide me code sample to do so ?
    Thanks in advance for your support.
    Sincerely
    Bertrand

    Hello Steve,
    Weeks ago, we developed a Linux application that configure NI acquisition board (serie X) to send an interrupt when FIFO count reach a given number. At this stage we manage to prove that our board configuration was good and that the problem was due to INtime. TenAsys (INtime developers) fix this issue few weeks ago.
    We just come back from holidays, apply the modifications created by TenAsys and manage to get interrupt inside INtime.
    We still have two problems.
    Reading DMA
    ===========
    From the interrupt handler, when we access to the DMA to get samples stored in the FIFO, we manage to get the samples inside the first interrupt handler. With the following interrupts, when accessing DMA with the tCHInChDMAChannel structure, it said that there is no available bytes. But when we read the Channel_Total_Transfer_Count_Status_Register from the DMA channel, we see that we have the desired numbers of samples.
    In the interrupt handler, during the interrupt aknowledgement, instead of only reading the Volatile_Interrupt_Status_Register to ackowledge the interrupt, if I increase the Channel_Total_Transfer_Count_Compare_Register_LSW by a given number (X) then I got X samples to read in the following interrupt. Problem with this solution is that the delay between two interrupts is not constant.
    It seems that we mis-configured the DMA channel. But don't manage to find the error.
    Two interrupts generated
    ====================
    Moreover, we always get 2 FIFO_Count interrupts. Even configuring conversion, sampling and interrupt frequencies at very low value (conversion 1KHz, sampling 1Hz, interrupt generation: 1Hz). The delay between the two interrupts is about few nano seconds.
    Source code
    ============
    I attach to this post the source code we use to play/test this configuration. There is a Visual Studio workspace that we used to play with INtime and a CMake configuration file that we used to manage our Linux tests. You can find all the informations you need to build the binary in the README file.
    Thanks in advance for your help with these issues.
    Sincerely
    Bertrand Cachet
    Attachments:
    IOMonitoring.zip ‏355 KB

  • How to combine Digital Output, a delay and Analog Input in a fast loop

    I need to develop a process loop that runs at least at 250 Hz that performs a Digital output, than a delay of 50 microseconds and than an analog input of all the channels. All will be done using ATI MIO 64E3 card. Of course, the acquired data will be processed, displayed and saved. The loop will be running for several minutes until user stops it.

    The fastest and most precise timing will occur if you use hardware timing. You can apply hardware timing to analog input on the E Series boards, but not the digital lines. Let's focus on the analog input first. Continuous waveform scanning uses a scan clock, which can be the board's internal one or an external one which you apply. If you want to scan all the channels 50 microseconds after a digital rising edge, then you need an external signal to signify that scan clock.
    The E Series boards also have 2 counter/timers onboard that you can use for this purpose. You can set up a retriggerable pulse generation operation, where the counter receives a trigger and then on the user specifications, produces a pulse. You can have that route to the analog input scan clock.
    The trigger signal for the counter is that digital pulse. As I mentioned earlier, there is no hardware timing for the digital lines on an E Series board. We do have other digital boards (653x family) that have hardware timed operations if precision is important. If you are satisfied with software's resolution (in the milliseconds), then you can call the E Series board digital function in a loop with a software timer. That digital line can route to the counter to act as the trigger.
    So, on the programming side, you can have three separate and independent operations in parallel. One is for the digital function to output on that line every so often. Another is for the counter set at the retriggerable pulse generation. The last is for the analog input. I will describe this in terms of LabVIEW, but it can be done in a similar fashion with the NI-DAQ function calls or Measurement Studio.
    The digital examples are in the LabVIEW >> Examples >> Daq >> Digital >> E-Series directory. The Generate Retriggerable Pulse example is in the LabVIEW >> Examples >> Daq >> Counters >> DAQ-STC directory. The E Series boards use the DAQ-STC timing chip.
    Go to the LabVIEW >> Examples >> Daq >> anlogin >> strmdisk.llb directory and start with the Cont Acq to Spreadsheet File. This shows how to continuously acquire data and stream it to disk while displaying the data on a chart. Streaming to disk is the efficient way to save data while you are acquiring, as it eliminates the overhead of always opening and closing the file through the iterations of the loop. This saves to a file that can be opened by other applications (Excel, Word, etc.), but it is not as fast as writing to a binary file, which must be opened and read back through LabVIEW. However, for your ~250 Hz rate, it should be fine. Then, go to the LabVIEW >> Examples >> Daq >> anlogin >> anlogin.llb and look at the Acquire N Scans -ExtScanClk example. This shows how to apply the scan clock. Here, the AI Start that you saw in the previous example is replaced by 4 VIs (3 AI Clock Config's and the AI Control). Make those changes to the first example and then add a constant 0 to the AI Control parameter for total scans to acquire. That specifies the continuous operation. The File >> VI Properties >> Documentation menu item of the example describes the physical connections.
    If you aren't using LabVIEW, use the NI-DAQ User Manual and the NI-DAQ Help file installed on your machine. You can look at your AT E Series User Manual at the http://www.ni.com/manuals pages for more information on the hardware. Also, if you want to route those signals internally on the board, you can find some entries in the KnowledgeBase at the http://www.ni.com/support pages.
    Regards,
    Geneva L.
    Applications Engineering
    National Instruments
    http://www.ni.com/ask

  • Triggered signal = digital output

    Hello everyone,
    I am using the following:
    NI6220(PCI, M-series)
    Visual Studio 2003 C#
    The project I am working uses a watchdog. I get a serial signal which I have to pass on. I was thinking of a trigger to read this serial signal, and then pass it directly on by using a digital output. At moment I read the serial signal with a pausetrigger which starts a pulsgenerator when it is high and pauses the generation when it is low. This is not what I want, because in this situation you are working with a predefined pulstrain generator(initialization of frequency, duty cycle et cetera). While the serial signal is randomly high an low I cannot use this predefined signal. Is there an other way to get this working.
    Can anyone please help me with this problem.
    Thanks in advance,
    Souza

    Hello everyone,
    I am using the following:
    NI6220(PCI, M-series)
    Visual Studio 2003 C#
    The project I am working uses a watchdog. I get a serial signal which I have to pass on. I was thinking of a trigger to read this serial signal, and then pass it directly on by using a digital output. At moment I read the serial signal with a pausetrigger which starts a pulsgenerator when it is high and pauses the generation when it is low. This is not what I want, because in this situation you are working with a predefined pulstrain generator(initialization of frequency, duty cycle et cetera). While the serial signal is randomly high an low I cannot use this predefined signal. Is there an other way to get this working.
    Can anyone please help me with this problem.
    Thanks in advance,
    Souza

  • Is this setup capable of Labview controlled analog or digital output to 5V?

    DAQCard AI-16XE-50 to a CB-68LP using Labview 6.1 and NI-DAQ 7. Win2k pro

    chazimusmaximus,
    For your specific DAQCard AI-16XE-50, the only output you can perform is digital output since there are no analog output lines on this board. Digital ouptut with NI-DAQ 7.0 will work with LabVIEW 6.1, but you can only use the Traditional DAQ VIs. Windows 2000 and the CB-68LP are both fine in this combination.
    For example programs, simply launch LabVIEW 6.1 and go to Help >> Find Examples. Then follow the path Hardware Input and Output >> DAQ >> Digital Input and Output >> E-series to choose the example that works best for you.
    Have a great day.

  • Help ! SBLive5.1 and QUAD CD-P - how to swith digital output to PC

    For the moment, my QUAD CD-P seem to be getting the signal but doesn't recognize it. I thought that maybe like a DVD, the digital output had to be switched to ''PCM'' instead of ''bitstream'' but I'm not even sure if the SBLi've 5. has that possibility or if I am mistaken altogether. I would greatly appreciate any hints regarding how this could be possible and with what kind of connections (cables)I would need.

    The Quad CD-P is a CD player wich acts as a pre-amp for the QUAD 99 series. This device only has digital and optical inputs No right or left inputs. No video inputs/outputs whatsoever.
    For the moment, it is now connected to a Quad 99 - Stereo Power Amp with the usual connectors (like the one for composite video, big RCA connectors, also called 'Digital inputs')
    I experienced some problems listening to the sound of my DVD until I found on the internet that I had to switch in my DVD menu the output from Bitstream to PCM. Afterwards, I had no problem listening to my DVD on the QUAD. Of course, with this configuration, out DTS but no problem with regular DolbyDigital. Quad being such a good (and expensi've) system, It doesn't matter that much. But the SBLi've seems to be a problem. As for my DVD, the QUAD pre-amp seems to be receiving the info from my PC but does not 'render' it. No sound is coming from my QUAD from the MP3s that are playing on my PC altough I tried to connecti it with a mini stereo-jack to digital (red and white) that fit on my sound card. Having had a similar problem with my DVD (quite basic actually), I thought that could be the same thing here. I tried several configuration playing with the 'sound and audio device' options from Windows XP's control panel but to no avail.
    I'm not even sure if it is possible to listen to music coming from my computer on this system. That is why I thought I would ask here 'cause I'm getting confused with something I know so little.
    Thanks.

  • Write digital output

    I have a 6152 card and I would like to now how to make a digital output from change state for n times using the card internal clock.
    I'm using V.B. 6 to program .
    thank you

    Hello,
    I suppose the board you are using is a M series board.
    Then you will need to call DAQmx drivers from VB6.
    It is possible with the DAQmx 7.5 drivers. You will find more details on the subject here :
    http://digital.ni.com/public.nsf/websearch/B22FE2B0F9C8935286256E920073DA07?OpenDocument
    regards,
    Marc L.
    NIF

  • Can PCI 6519 IO card support waveform(digital) output ??

    It is quite hard to find out in the spec.
    NI group all the series of DAQ board in the spec.
    Can anyone tell me if it can support waveform output .
    The waveform is about 1Khz
    thx very much.

    The PCI-6519 does not support hardware-timed digital I/O. You can update the digital output one sample at a time in software, so you are limited by the speed of the computer you are using as to how fast the updates can be.
    Michael P
    National Instruments

  • 50Hz cycling of digital output

    Hello,
    I would like to cycle a digital output at 50Hz with a 50% duty cycle. I am only able to cycle the output at up to 32Hz. Why?
    I am using NiDAQ 7.1 with Visual C++ 6.0 on a 1GHz Pentium with 1GB RAM.
    The code is attached.
    Please help.
    - Tree
    Attachments:
    DOmain.c ‏4 KB

    Hello,
    After looking at your code for a few minutes and I have a couple of suggestions that might help to solve this issue:
    1. Try removing the printf() function calls inside the while loop that is writing to the digital line. Sometimes the printf() function can take a significant amount of time to execute, this is especially apparent in tight timing loops like this one.
    2. I�m not sure what DAQ board you are using but all of our E-series DAQ boards have counter/timers onboard. These timers are better suited to generating pulse trains at various frequencies. There is an example which demonstrates how to do this that installs with NI-DAQ. Just go to your NI-DAQ install directory on your hard drive (usually �C:\Program Files\National Instruments\NI-DAQ
    \�), from there go to �\Examples\DAQmx ANSI C\Counter\Generate Pulse\Dig Pulse Train-Cont�. This project generates a continuous pulse train from one of the counters on a multifunction DAQ board.
    I hope this helps. Please let me know if this doesn�t solve your problem or there is anything I need to clarify. Have a great day!
    Ken S.
    National Instruments

  • New Dell, Audigy MB Advanced has no "enable digital output" b

    Hey all.
    I have a brand new Dell Dimension 550 system, on which I ordered the Audigy MB Advanced.
    Actually I intended to get the X-Fi Music soundcard, but apparently spaced out and clicked the wrong thing. Bummer for me. Oh well I'll buy it later.
    Anyway I have no digital sound from my speakers, which are Boston Acoustics Digital MediaTheater. This is the 4. setup that came with my '98 Gateway G6-450, back when BA and Gateway were partners. These are *not* some of the speakers (I think like their 735 series) that require digital drivers. It's either a single analog cable, or a single digital cable, to run the full 4. setup, from the subwoofer plugged into the PC.
    Analog sound works fine, but I cannot get digital to work. The problem lies, I believe, in that I don't think the software recognizes that digital output is possible. Again, this is the OE soundcard, but it has the blue input port, the green output one, the pink/grey microphone/rear surround output, and also a yellow and black port, which are for surround connections (that I don't need).
    I will be upgrading to a better soundcard, but for now I just want digital to work. This is a common issue with people going from Win98 to XP, it seems, but... though I've found a post or two on this forum, the FAQ on BA's site, and some stuff via Dell and the Web, I really can't figure this out.
    I've run the BIOS sound test, that checked out. No control panel option works to get digital output working, and I've confirmed with Dell that digital output should be an option. Should be able to click on Volume Control in the taskbar, which brings up the Creative Surround Mixer. From there, click Speaker Settings. I have Speaker/Headphone Selection set to 4/4. and the "Synchronize with Control Panel" box checked. Below that should be at least one more box, including "Enable Digital Output" or similar. But it's not present at all. Blank.
    I don't know if a software reinstall would work or not. Anybody know what's up, here?
    Thanks!
    =S2=

    I've recieved a reply from Support telling me to email Dell, but from seeing other posts and topics, I have seen that this is useless. Most of the other people who have encountered this problem have resolved it via Creative not Dell.....Why do I have to go to Dell? Argh ?Thanks for the reply though :\

  • SB X-FI Titanium.. Digital output works but Analog Signal M.I.A.

    @SB X-FI Titanium.. Digital output works but Analog Signal M. I.A. Hi Guys,
    I recently installed a new hard dri've on my machine after my power supply failed and fried it. After reinstaling Vista 64 and my drivers I noticed that my sound card was not working properly.
    In.. control pannel > Sound > Playback I see my soundblaster listed but only the digital out is showing. There are two other icons listed.. one is for "Digital Output Device 2-High Definition Audio Device.. and one for a 3-High Definition Audio Device. I don't remember these being listed when my sound card was working properly before the HD crash.
    No icon representing my analog output (Left/Right, Center, and Rear?Speakers)?is displayed. I reinstalled the drivers, updated the drivers, reformatted my HD and started all over again but nothing works.
    I made sure that my motherboard sound card is disabled.. I am really stumped.. The sound card used to work quite well.. Has anyone else had this problem and been able to fix it's
    Here is my system info:
    Motherboard: Gigabyte GA-MA790FXT-UD5P (Realtek Audio Disabled)
    Sound Card: Internal Sound Blaster X-FI Titanium
    Any advice is much appreciated.

    DRe: SB X-FI Titanium.. Digital output works but Analog Signal M. I.A. High definition audio device is what your card is detected as until you install the original CD driver or the Daniel K 2.0 support pack. Then you can update to the newest Creative drivers. I tried to format just like you and thought that I would just download Creative's newest driver and start from there. No Go!!? The newest Creative driver seems to install, but then after reboot like you, I have multimedia audio device.
    So take out your CD if you have it, and run the driver setup only. Then using just this driver you can install all of the newer Creative updates. The Creative auto updater is installed along with your original driver and you will see it detect all available updates.
    Easiest solution of all,
    Try this pack and save yourself a load of hassle........
    http://forums.creative.com/t5/Sound-Blaster/SB-X-Fi-Series-Support-Pack-2-0-05-5-2009/td-p/527485
    This will install a very proper Creative driver, and applications that will work very very well on your system compared to the CD orignals

  • Solution to my Audigy 4 Digital Output probs... please make a stic

    I was recently playing Q3TA with my son when my overheat protection kicked in. I exited to windows to see the temp and throttle back my CPU a tad, and when I returned I had no sound from my digital output. Analog was working fine, however.
    Setup:
    Giga-byte GA-MA78GM-S2H w/780g chipset
    Athlon 64 X2 5000+ BE
    Integrated Realtek HD audio (disabled)
    Integrated ATI HD 3200
    2xGB 800MHZ DDR2
    Creative Audigy 4
    Boston acoustics Digital BA735 2. speakers
    I went over every setting in all of my consoles, HQ's and drivers. I played with driver versions, DirectX versions, diagnostic programs and procedures in the knowledge base. In defeat, I even wiped out my XP install and started fresh with the Aud-4 removed, using analog on the integrated card thru headphones. Then I disabled the integrated card and reinstalled the Audigy 4 only to find that there was still no sound from the digital speakers.
    Solution?
    I[color="#ff0000"] unplugged the power to my speakers, and reconnected everything. As soon as the power was back up, the sound started playing (I had a .MP3 on for testing).
    This stumped me for two reasons that occur to me know:
    . These speakers (and possibly many others) don't fully power down when you turn the volume knob off and the light on the satellites goes out. The decoder and subwoofer unit keep their light on.
    2. Apparently, some situations introduce a faulty signal to the digital output that scrambles the speaker units and they refuse to operate any longer.
    Now I know, unplug the power to my speakers. My system works on all three sampling frequencies in "audio console" 44., 48, and 96KHz. None of the troubleshooting procedures touched my problem, because they didn't even mention the speaker setup, let alone doing a hard reset.
    Please please please!
    Make this a sticky for future me!!!

    The Digital output jack on the card isn't of optical signal type.....you will need to get those I/O module mention bt johnston2 for optical connection.

  • USB-6009 Digital Output Current

    You need to have all those grounds connected together - USB-6009 Digital Ground, ULN2003 GND, and the power supply ground. In this case it will not matter how they are connected.  If they are not connected, then one of the devices could be damaged.
    Lynn

    Hi, I'm trying to increase the voltage of the digital outputs of USB-6009 device. I read a couple topics about using a relay but I could not manage it.
    I was thinking to use 5V supply on the card since it has 200mA current on it, but when I use it with open-collector output, it can not switch the relay. When I measure the current between
    5V and ground: 200mA,
    5V and output, I read a value around 30-40 mA.
    Why can't I use that 200mA with an output? This is the relay I'm using.
    If this is not possible, can I use an external 5V supply (with more current) and a digital output to switch the relay without damage the 6009?

  • USB-6009 pulse train generation with digital output....

    Hello!
    I've bought a new USB NI-Card (USB-6009) and now I'm trying to adopt an old vi that uses traditional DAQ drivers. I wrote that vi for a PCI NI-Card (PCI-6024E), which has two counters to generate two pulse trains simultaneously. Now I've only one counter and that's why I'm searching for a good way to create pulse trains using a digital output! The pulse trains are both ranging between 100 Hz and 100 kHz.
    I'm sure somebody has an idea how I can solve the probem in the best way
    Kind regards,
    Peter

    You can't do it with this low cost board. Both digital and analog outputs are software timed only. The analog out is rated at only 150  samples/sec and the digital is about the same. You can't even use one of the counters because it is not a hardware timed counter output. It is an event counter only as an input.

Maybe you are looking for

  • Can you use home sharing for photos?

    I just installed the app Remote by apple. It's for home sharing with iTunes or Apple TV. Can it be used for photos as well? I have an iMac OS X 10.6.8. Is there an app I can use for viewing and transferring photos over the Internet? Please help. Than

  • ITunes and Quicktime won't run

    I had itunes and QT working fine when I bought my Ipod. I bought my son a Nano and that is when everything went bad. I have tried everything the apple website has to offer. I am at the point where I was able to download and install the latest version

  • Low Bandwidth to my PS3-What Can I do

    I recently upgraded my fios connection to 35/35 and my laptop is working in that speed range.  I ran a an ethernet cable from my FIOS router to my PS3.  The run is about 40ft and the Cat5 cable tested clean.  However when testing my link speed on my

  • Emailing and synching over GSM network (i.e. without wifi)

    My new iPhone emails no problem with WiFi but does not seem to without the Wifi. Do I need to change the settings? I also want to synch my contacts and calendar and iTunes (podcasts) the same way.... Is that the same issue or should I adjust somethin

  • Help; I can only synchronize parts of my iPhoto library to my iPad.

    Help; I can only synchronize parts of my iPhoto library to my iPad. When I connect my iPad to my iMac using iTunes, I am not able to synchronize all of the library. I have marked off All pictures, events etc., but it only synchronize parets of it. I