Quantcast
Channel: Digital I/O topics
Viewing all 2181 articles
Browse latest View live

Leer una señal digital con daq6008

$
0
0

Buenas tardes a toda la comunidad soy nuevo

Quisiera saber como generar una señal ssb y una señal de clk con la daq6008 para poder leer el módulo max6675 estas señales son necesarias para poder hacer funcionar el módulo si alguien pudiese ayudarme le agradeceria mucho de antemano gracias 


Running a motor

$
0
0

I am using DAQmx to acquire and generate digital inputs and outputs to run a car forward and reverse, triggering off of lasers. The trip lasers are normally High (1) and then go low (0) when something breaks the beam. The code attached functions. The car drives forward when you press start, drives to the end and when the laser is tripped it flips to reverse and comes back. When it gets to the left sensor it trips and goes forward and keeps doing that. I have been trying to figure out how to stop the car (output 0 to FWD and REV) for a second before it flips direction and I can't figure it out for the life of me. Any help is appreciated. Maybe there is a better way to do it all together???

 

If it is any use:

Forward output: Mod4/port0/line1

Reverse output: Mod4/port0/line0

 

Left sensor input Mod3/port0/line1

Right sensor input Mod3/port0/line0

 

Power Connector for a RoboRio (2-position MINI-COMBICON, 3.5 mm)

$
0
0

Our FRC team has a number of RoboRio units, however over time, some of the 2-position MINI-COMBICON, 3.5 mm power connectors have been lost.  Aside from the kit that NI offers for $49 that has parts we'll never use, is there a source for the one specific connector?

 

Thanks!

 

Greg

Erroneous input values from accelerometer

$
0
0

Hi! I am not sure this is the correct topic for such a question, because I struggle at identifying whether my problem is at a HW or SW level. I struggle at making my acquisition system acquiring correct measurement values. I use a NI USB-4432 device with LabView 2014 SP1 on windows 7. My setup involves an impact hammer test. In particular, I use a PCB ICP 086E80 impact hammer and a PCB ICP 352A24 accelerometer (-50G to + 50G, with 100 mV/G as sensitivity, with excitation current of 2,1 mA). The hammer enters the ai0 channel, while the accelerometer is put on the ai1 channel. Finally, the hammer triggers the acquisition of both the hammer impact and acceleration within the device. The trigger is an analog edge with rise slope. The DAQ assistant virtual channels settings are attached as images. Basically the hammer impact range is from -5 to 15 N, while the accelerometer is used at its full range (-50G to 50G). My problem is the following: when I perform the impact, the accelerometer registers an acceleration which initially ranges from -120 to 120 G, then correctly sets on values below +-50 G. I would expect my accelerometer to saturate, nevertheless the acquired waveform seems not having troubles with such out of range values. I tried to convert the virtual channel from acceleration to voltage and measure the input. In this configuration, the sensor seems not to saturate at +- 5 Volts, which should correspond to +- 50 G for the acceleration. I have attached some screenshots to better explain the problem. 

I hope someone could help me, as I tried everything but still cannot get my head around it.

Thank you in advance to everyone would help me!

Digital output line remains high after digital waveform output

$
0
0

Hello,

 

I am using a NI USB-6229 device and working on outputting an arbitrary sequence of low's (0V) and high's (5V) on one of the digital output lines.The problem I am experiencing is after the digital waveform is output, the line the waveform was output on remains in the high state. This happens regardless of whether the last sample in the digital waveform is a 1 or a 0. My digital waveform output task is configured as shown below.

_digitalWaveformTask = new Task("DigitalOutputTask");            
_digitalWaveformTask.DOChannels.CreateChannel("Dev4/port0/line0", "do0", ChannelLineGrouping.OneChannelForEachLine); _digitalWaveformTask.Timing.ConfigureSampleClock("/Dev4/ao/SampleClock", 5000, SampleClockActiveEdge.Rising, SampleQuantityMode.FiniteSamples, 1000); _digitalWaveformTask.Done += delegate { _digitalWaveformTask.Stop(); _digitalWaveformTask.Control(TaskAction.Unreserve); }; _digitalWaveformTask.Control(TaskAction.Verify);
_digitalWaveformSingleChannelWriter = new DigitalSingleChannelWriter(_digitalWaveformTask.Stream); _digitalWaveformSingleChannelWriter.WriteMultiSamplePort(false, GenerateDigitalWaveformData());

The GenerateDigitalWaveformData method generates a digital waveform of arbitrary length that alternates between high & low states. Before returning an int[] it makes sure that the last sample in the array has a value of 0, I thought that this would force the line back to a low state but it doesn't.

 

Edit: The digital waveform is getting output correctly from what I can tell, the line it is getting output on is simply not returning to a low state afterwards.

 

What am I doing wrong?

NI-6528 connector and cable

$
0
0

Hey,

 

   I am looking at the connector pin out for the NI6528 and the recommended cable SH100-100-F and they do not match up. The connector on the board looks to be grouped by pairs, ie 1 and 2, 3 and 4, and so on.  The cable is paired in 2's as well, but the twisted pair's are 1 and 51, 2 and 52, and so on. This seems to indicate that the differential pairs are separated and not together like they should be. How big of a problem is this if the cable is only 1 meter in length? Should I look for/design my own cable, or can this still work, or am I missing something simple and silly?

P0.line4:7 output problem

$
0
0

I output P0.line0-31 to logic "1" from test panel of MAX, then measure  the output voltage of each line;the line0-3,8-31 voltage are OK,and the line4-7 also keep logic "0".The DAQ's USB-6289

Connecting a LED to Digital Output

$
0
0

Hi all,

 

I'm trying to connect an LED light to digital output 15 on an NI myRIO using labVIEW. 

 

It's a simple program, but I can't get it work. Any help would be great.

 

P.S. I'm loving this community support. 

 

 

 

 


NI PCI 6509 not working under Win 7 at the same sample rate like under Win XP

$
0
0

Hello together,

before I come to the actual problem I want to tell you whats this about, we got an old testbench at which we test rotary encoders, in the testbench pc (win xp 32bit) we use the NI 6509 which reads the encoder state. In the test procedure we turn the encoder at a specified speed and verify that all gray values are read at the first turn, therefore we use the C API in an inhouse software. In the software we use the change detection to read the encoder values in the callback. That so far works perfectly.

The problem now is:
Since the old testbench is, well, quiet old, we decided to build a new one with a newer pc with Windows 7 64bit and the same NI 6509 card. The NI card works there too and reads the gray values but not at the specified speed of our gray encoder test (which works on the old win xp pc with the same card / specified speed -> all values read). If we make the same encoder test at the same speed on the win 7 pc it misses about 1/16 (about 1000) values. To eliminate our inhouse software as source of the problem I have written a small Qt programm that only access the NI card via the C API and logs the read values. With that test program I get exactly the same result, I get all values on the xp pc and alot misses on the win 7 one. With missing I mean that the gray values just dont get sampled. Its not always the same values that are missing, if we turned the encoder more than one turn for example we would get all values but thats not the goal.

So the question is, why does the same NI 6509 card that works under Win XP with a certain sample rate (encoder rotation speed) not work at the same speed under Win 7?

What I have tried so far without results:

-I have written a test program that only uses the used C API calls:

#defineSAMPLES_PER_CALL10000
#define
COUNT_GRAY_POSITIONS16384
void NidaqInterface::InitGrayConnection()
{
    qDebug() << "InitGrayConnection()";

    if (!DAQmxCreateTask("", &hTask))
    {
        qDebug() << "DAQmxCreateTask()";

        if (!DAQmxCreateDIChan(hTask, "Dev1/line0:13", "", DAQmx_Val_ChanForAllLines))
        {
            qDebug() << "DAQmxCreateDIChan()";

            int iStat1 = DAQmxCfgChangeDetectionTiming(hTask, "Dev1/line0:13", "Dev1/line0:13", DAQmx_Val_ContSamps, SAMPLES_PER_CALL);
            qDebug() << iStat1 << "DAQmxCfgChangeDetectionTiming()";

            int iStat2 = DAQmxRegisterSignalEvent(hTask, DAQmx_Val_ChangeDetectionEvent, 0, NidaqInterface::ChangeDetectionCallback, NULL);
            qDebug() << iStat2 << "DAQmxRegisterSignalEvent()";

            if (!DAQmxStartTask(hTask))
            {
                qDebug() << "DAQmxStartTask()";
            }

        }
    }

}

int32 CVICALLBACK NidaqInterface::ChangeDetectionCallback(TaskHandle hTask, int32 signalID, void *callbackData)
{
    uInt16 data[SAMPLES_PER_CALL];
    int32 read;


    if(!DAQmxReadDigitalU16(hTask, -1, 1.0, DAQmx_Val_GroupByChannel, data, SAMPLES_PER_CALL, &read, NULL))
    {
        for (int j = 0; j < read; j++)
        {
            uInt16 num = data[j] & (COUNT_GRAY_POSITIONS - 1);
            QString hexNum = QString("0x%1").arg(num, 4, 16, QLatin1Char( '0' ));

            testState[num] = 1;

            qDebug() << "Gray data[" << j << "]:" << hexNum << ";" << num;
        }
    }

    return 0;
}


-Installed 4 different driver versions, 17.5, 16.0, 8.6.1, 9.1
-Upgraded Win 7 with all available updates
-Changed the NI 6509 cards of the working Win XP pc with the Win 7 pc
-Tried different encoders

I am really at the end of my knowledge, in my opinion the problem has to be somewhere between the C API calls and the hardware, but I honestly don't know where exactly.

 

If anyone can give me some helpful ideas or new inspirations I'd be very grateful.

Thank you all,

Regards
Todd

 

NI-9403: Acheiving maximum 7us update rate

$
0
0

The NI-9403 module has an update rate of 7us, so in theory it should be able to output a clock period of 2*7us=14us or 71kHz.  I have a simple program which inverts the boolean input to a single NI-9403 channel, enclosed in a continuous while loop (no timing functions or single-cycle loops). However, I cannot get more than 38kHz out of the module.  Without disabling arbitration, is there a way to get to a higher data rate?

How to set the sample clock signal from line PFI4 to zero after running the program?

$
0
0

Hello all,

 

I suffer from a problem since weeks ago and want your help.

 

I have a NI PCI 6535b card. I notice that after I run my program, the sample clock signal from PFI4 is always there, even I exit LabView software. How can I set it to zero after the program stops?

 

Thank you in advance.

 

Best regards,

 

David

How to remeber output states on usb 6501

$
0
0

Hi,

I am new in labview.

I am  need do that, I can't send data on usb 6501 and the card will by viewing previous state still.

Any ideas ( maybe some sihift register)?

I need some example.

 

Thank you

Bertec force plates with .NET

$
0
0

Hello community,

I am trying to connect a Bertec force plate to labview using the .NET interface. 

 

This involves loading  "BertecDeviceNET.dll" into labview. This DLL comes from the Bertec website,  and downloading the most recent "Bertec Device SDK" from May 2014.

 

I know this is possible, as it has been done before. See these posts:

https://forums.ni.com/t5/LabVIEW/Is-there-a-simple-way-in-LabVIEW-to-collect-data-from-two/td-p/1736580

https://forums.ni.com/t5/Digital-I-O/Bertec-force-plates/td-p/2532076

 

I've tried following the solutions listed, and feel optimistic about things. Except I can't seem to be able to load the .NET DLL into labview. It keeps telling me "An error occurred trying to load the assembly" and then I can't proceed.

 

I am using the 32-bit version of the DLL, and the 32-bit version of Labview 2017. The DLL is in the same local folder as the labview VI. I've tried loading it into Labview 2015, and 2016, both 32 and 64 bit versions (the Bertec SDK has 64 bit versions as well). But no luck. 

 

I'm not sure what to do next. It might be that Bertec's DLL is just bad, but I'd be surprised Bertec didn't catch that yet, as the SDK was released in 2014.

 

Is anyone else able to load the DLL? If so, what am I doing wrong?

 

 

Replacing software trigger with physical trigger

$
0
0

Hi,

 

I am new with control system so excuse me if this sound trivial.

 

Currently I am using a USB6001 running a Labview program with 4 radio buttons trigger 4 different set of codes for Analog Output to a servo motor.

 

I like to replace the 4 radio buttons with physical push bottoms or equivalent, and change the radio buttons to indicators.

I was reading the manual about PFI and the USB6001 only has two of them.  Does that mean I am maxed out with the ability to use 2 physical triggers? 

Can I use the digital Input for the same purposes?

And if there are other way to achieve this, please let me know. 

 

Thanks, Billy  

 

about NI9230

$
0
0

we are in need to buy a NI9230, or something equivalent (to valutate vibrations in an idraulic system). This should be used with a CompactRio, as far as what i have read on the datasheet.

 

We already have a NI cFP-2000, it is ok using NI9230 on this?

thank you!


SDRAM load capacitance calculator

$
0
0

I am interfacing SDRAM IS45S32160F-7BLA2 with MPC8270 PowerPC Processor.

Input capacitance of SDRAM is 6pF per data line and i am using 4 SDRAM's which add upto 24pF of capacitance load.

Processor suggest to have a minimum loading of 20pF. 

Now the problem is current . Processor datasheet says Ioh = -2mA and Iol = 6mA. at Voh = 2.4 and Vol = 0.4

Keeping this current in mind, i=C dV/dT fails, as 20pF of load capacitance needs around 60mA and Iol and Ioh is 2 to 6mA , which i cannot understand?

SDRAM load capacitance calculator

$
0
0

I am interfacing SDRAM IS45S32160F-7BLA2 with MPC8270 PowerPC Processor.

Input capacitance of SDRAM is 6pF per data line and i am using 4 SDRAM's which add upto 24pF of capacitance load.

Processor suggest to have a minimum loading of 20pF. 

Now the problem is current . Processor datasheet says Ioh = -2mA and Iol = 6mA. at Voh = 2.4 and Vol = 0.4

Keeping this current in mind, i=C dV/dT fails, as 20pF of load capacitance needs around 60mA and Iol and Ioh is 2 to 6mA , 

 

So how this 6mA will fullfill the requirement of 60mA of load. This load is on databus of processor.

Digital IO Port Width

$
0
0

Hi all,

 

Does anyone knows how to extract a DIO Port Width from a C# code? That means the number of digital lines of a DIO port.

Thanks in advance.

DC voltage measurement of a series coil circuit with NI 9205

$
0
0

Hi all,

 

I need to measure the DC voltage across a circuit comprising 24 coils in series. The voltage across each of the 24 coils ranges from 0 to 10 mV DC (much less than 1 V) . I was looking to use an NI 9205 module (on +/- 200 mV range).

 

Would the NI 9205 be suitable for this application and what connection arrangement is recommended.

 

I was thinking that I could not use differential measurement of voltage because of the series coil circuit as I would need to connect say the AI Ch0- of Coil 1 to the AI Ch1+ of Coil 2 etc. Or does the NI 9205 multiplexer negate this concern?

 

The other option would be to use the nonreferenced single-ended (NRSE), connect a common section within the series coil circuit to AI Sense terminal and then connect AI Ch0+ to Coil 1 and AI Ch1+ to Coil 2 etc. I would then have to calculate the difference in voltage in Labview to determine the individual voltages across the coils.

 

I would appreciate any comments or advice on the suitablity of the module and recommended wiring connections.

 

Thanks for your help!

 

Peter.

Time between two signals USB-6003

$
0
0

Dear all,

I am trying to measure the time between the activation of 2 light gates (response time <500us) with a Visual Basic app. The precision I need is in the order of 10ms. I am trying to use a USB-6003 that I already have. What I have done so far is to program a Timer at 1ms elapsed time and read inside the digital channels where I have my light gates connected. But the time I get is not realistic, the loop is too slow (probably ReadSingleSampleMultiLine is slowing down the loop).

 

readData = myDigitalReader.ReadSingleSampleMultiLine()

LG1_Flag_Temp = readData(0)

LG2_Flag_Temp = readData(1)

 

I could also connect the light gates to the analogue input (Sample rate up to 100kS/s in USB-6003), but I don't know how to measure the time between the two rising edges doing it like this.

 

Could anyone give me some advice please?

Viewing all 2181 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>