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

Can you produce arbitrary TX data with the USB-8452 in SPI Streaming mode?

$
0
0

I am using an NI USB-8452 controller in SPI mode, controlled by a C program compiled in LabWindows/CVI 2013. In order to talk to the chip we've designed, I need to control the delay between the final deassertion of SPC and the deassertion of CS (timing parameter T11) to keep it very small. Therefore, I'm using streaming mode.


I've read the NI-845x Hardware and Software Manual and looked at the two projects that use SPI streaming mode in the NI-845x examples dir. The examples are both using SPI to talk to A/D converters. In other words, the time-varying data is coming from the SPI slave (ADC) to the SPI master (NI 8452 controller) via the SPI_MISO line.

 

Is it possible to use the USB-8452 to generate time-varying data that goes the other direction, from the SPI master to the SPI slave via the SPI_MOSI line? Can I do a burst write of arbitrary length using streaming mode?

 


For example, let's say I have 8 bytes of data to transmit:

 

WriteData[] = {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08};


If I try to send this as 4 16-bit samples:

  

ni845xSpiStreamConfigurationSetNumBits(StreamHandle, 16);
ni845xSpiStreamConfigurationSetNumSamples(StreamHandle, 4);
ni845xSpiStreamConfigurationWave1SetMosiData(StreamHandle, WriteData, 8);

ni845xSpiStreamStart(DeviceHandle, StreamHandle);

 

I would expect to see transmitted:

 

0x0102
0x0304
0x0506
0x0708

 

Instead, what I actually see is the first word repeated NumSamples times:

 

0x0102
0x0102
0x0102
0x0102

 

 

Is there any way to generate the first (non-repeating) pattern? Or is streaming mode really only capable of capturing input data?

 

I thank you for any help you can provide.

 

-jskroch


Stimulus Response SR Block

$
0
0

Hi in the article

 

http://sine.ni.com/np/app/main/p/ap/mi/lang/en/pg/1/sn/n17:mi,n21:155/fmid/2947/

 

on hi-speed digital ATE and stimulus response features, there is a good example of testing an SRAM I/C that is the closest example I have seen so far to what our application is using with the LabVIEW PXI chassis and 6555 HSDIO card for.

 

We would like to use the stimulus response with one datafile (which we are generating with Modelsim into VCD format and using the Digital Waveform Editor to convert to HWS format), and use the real-time hardware comparison method.

 

In this article there are some example screenshots of apparently working LabVIEW *.vi examples.

 

Questions:

 

1.  Is the source for these examples available?  We have found some example source for simple pattern generation and acquisition but not using the stimulus response approach that synchronizes the acquisition to the generation and uses the SR block to split up the datafile.

 

2.  What is the SR labview block called (Figure 4, block labeled Parse Data) and where is the documentation on how to load a HWS file into this auto-parsing step.

 

3.  Are there two separate waveforms (generate / acquire) that are loaded into the 6555 card's memory, or is it only one (stim/response)?

 

Our labview guy is asking me to generate two separate HWS files from our VCD file, but the way this article seems to be written is that it is really ONE waveform.

 

Thanks.

 

Ed

 

HSDIO Documentation

$
0
0

Capture.PNG

From LabVIEW 2013  NI HSDIO 1.9.5

What is a "Multi Bus 1D WDT"?

NI 9481: how to reset the Digital Output to "open circuit" after stopping labview run?

$
0
0

Hi guys, 

 I am trying to control water circulation pumps with relay NI9481 based on some temperature differences. It works fine but I also want to stop pumps operating when I press stop button on the front panel. Now if I press stop when the LED indicator on the relay is ON it stays on and I have to use MAX to turn it off. How can I set the switch to open the circuit automatically at the end of run? Thanks.

printscreen.jpg

configure digital output regeneration with 6533

$
0
0

Hello!

I want to continuous write a digital signal with the 6533 (PCI-DIO-32HS). This digital signal is generate from a finite pattern of 0 and 1 read from a txt file. The user could choose the sample rate and if the sequence will repeat continuously or only once.

 

  • I tried already with the “Write Property Node” in a while loop with a write function, but I can´t achieve it…The combination of this node with the DAQmx functions: write, start task, etc. that I did is not working.

Which functions should I use (write, start task, node, etc.) and in which order?

Which functions have to be in the while loop?

How should I configure the Write Property Node?

  • I tried also with the continuous sample mode from the DAQmx Timing and a continuous signal is generated. But how can I control to stop the task?

Because with this option I use the DAQmx Wait until done and I have this error -200560

 

Which option is better or should I do another?

 

Thank you!

output cRIO timer

$
0
0

Hi everybody,

I'm new with labVIEW but I need help to accelerate my studying progress to make one system, I've done, working. 
I'm working with a cRIO and some AI and DI/O modules.

 

1) I have an analog signal input, an AI, that when it is below a fixed value, let's say for example 6, it will give a signal to a DO that makes the start for a pump.

2) My problem is that: when the pump starts, it must run not continuously but every let's say 20 seconds for 40 seconds.

3) When the signal from the AI is over the value of 6, the pump must stop.

 

I did a .vi that works fine with cRIO and AI, DI/O modules for the points 1) and 3). My problem is the point 2) if the pump starts I don't know how to make it "timered-looped" and to stop it when it has to stop (from the AI, signal beyond the fixed value)

I hope to have been clear.

Thank you very much for your help 

range signal control

$
0
0

Hi everybody,
I just started using labview, but I would like to fix an electrical process I have in mind..
fortunately I have already solved some problems with my electrical process IN/OUTPUT from my new cRIO, but now I'm getting in trouble with another solution, this is the problem:

I have an electric signal (mA) from an analog input (AI) in the cRIO, and 2 valves to control through 2 different Digital Output (DO1 - DO2)

when the AI value is let's say 6, I have to give a signal to the DO1 but NOT to the DO2.  At that point I'm sure the value of my current (AI) will go down.

since the AI is greater than 5,  I have to give a signal to the DO1 but NOT to the DO2.

 

when the AI value is below 5, I have to NOT give a signal to the DO1 but YES give a signal to DO2

since the AI is below than 6, I have to NOT give a signal to the DO1 but YES give a signal to DO2

 

I mean, when the value from the AI is going from 6 to 5 , I have to give a signal to DO1 but NOT DO2, but when the value from AI goes on the other direction from 5 to 6, I have to give NOT a signal to DO1 but YES give a signal to DO2.

This is what I've done so far. (attached), I think the problem is more complicated than what I'm doing on my simple .vi

Thank you very much!

NI Setup for simple driver?

$
0
0

Hello,

first excuse me as I don't find a good board to post this general question!

 

I've got the NI USB-6051 device but I can't find the pure driver for Windows! I want to do a SMALL silent setup (maybe a different one for x86/x64) with with just the sys driver and the additionally needed NICAIU.dll. How do I extract this niem* stuff from the whole setup?

 

Thanks in advance


selftest

$
0
0

I am trying to run the selftest on the NI6514 DIO module in Visual Studio C# using the.NET interface for the NationalInstruments.DAQmx. When I looked at the prototype it shows:

 

       void selftest();

 

So there seems to be no way to get the test results back form the self test call. I looked at the equivalent C function call template and it is expecting an integer to be returned.

 

Is this a bug or am I missing something?

Does NI PCIe-6612 card communicate through SPI

$
0
0

Dear all,

 

 

Does NI PCIe-6612 card communicate through SPI [serial pheripheral interface].

 

NI 9401 with cRIO 9073

$
0
0

DearEngineers,

 

I am using NI 9401 DIO card with cRIO 9073. 

I should use 1 channel and generate the frame of 96 bits. The bits will be user configurable. How doi do it. If i get answer to this i shall be able replicat the same with other 3 channels. So my Agenda is to have the frame format generated using 4 independent channels.. Please help me out with the solution and the help shall be greately appreciated

 

Baud rate of the signal shall be 9.6kbps.

 

 

Thanks

Bhargav

can DAQ 6008 control degree of servo motor ?

$
0
0

Hi, I'm new using DAQ and LabVIEW. I've project to control degree of servo motor. can device NI-DAQ6008 control it? I ever used pwm example but I had some error before the program running it.

 

Servo Motor.jpg

 

example motor servo which I want control.

 

thank's

Ni 6221 intput/output

$
0
0

Bonjour,

 

Nous devons faire une lecture/ecriture d'une carte SCB-68. Nous voulons réaliser cette tâche en continue afin d'écrire directement la valeur de l'entré sur la sortie.

 

Voila notre programme:

 

#include <stdio.h>
#include <windows.h>
#include "include/NIDAQmx.h"

int main(){
while(1){
ecriturelecture();
Sleep(1000);
}
return 0;
}

 

int ecriturelecture(void)
{
TaskHandle taskHandle;
int lecture, ecriture;
int32 read,written;

DAQmxCreateTask("",&taskHandle);
DAQmxCreateDIChan(taskHandle,"Dev1/port1","",DAQmx_Val_ChanForAllLines);
DAQmxStartTask(taskHandle);
DAQmxReadDigitalU32(taskHandle,1,10.0,DAQmx_Val_GroupByChannel,&lecture,1,&read,NULL);
printf("Valeur: %i\n",lecture);

 

ecriture=lecture;

 

DAQmxCreateTask("",&taskHandle);
DAQmxCreateDOChan(taskHandle,"Dev1/port0","",DAQmx_Val_ChanForAllLines);
DAQmxStartTask(taskHandle);
DAQmxWriteDigitalU32(taskHandle,1,1,10.0,DAQmx_Val_GroupByChannel,&ecriture,&written,NULL);
return 0;
}

 

Nous arrivons à lire la première valeur mais ensuite toute les valeurs sont égales à 0.

 

Comment faire en sorte d'écrire la valeur d'entrée sur la sortie sans devoir relancer le programme ?

 

Merci d'avance

NI 9401 du crio 9074

$
0
0

bonjour,

Est ce que je peux utiliser le mode scan engine pour envoyer un signal de commande numérique de fréquence 20 KHz en utilisant  le NI 9401 du crio 9074.

merci

Programming digital I/O pins on the NI myRIO-9100 for serial communication

$
0
0

I am using NI myRIO for my robot and I want to use four distance reading sensors which communicate through serial port. But the myRIO has only two UART ports on board so I was wondering if there is a way to program more digital pins to use them for serial communication. Any help appreciated.


digital electronics

$
0
0

hello, please I have this question from a digital electronics class section where we were discussing number systems, such as the binary, the octal and the hexadecimal number system and a member brought up this question, which is quite challenging to me so please I need your help in solving and understanding it. please

digital electronics

$
0
0

             NEED ANSWERS TO THESE QUESTIONS IN DETAIL

 

The ABC co-operation chemical processing plant uses a computer to monitor the temperature and pressure of four (4) chemical tanks as shown in the figure below. Whenever a temperature or pressure exceeds the danger limit, an internal time sensor applies a 1 to its corresponding output to the computer. If all conditions are ok, then all output are 0.

ASSIGNMENT DRAW.png

Question 1.

If the computer reads the binary string 00101000, what problems exist?

Question 2.

What problems exist if the computer is reading 55 hexadecimal?

Question 3.

What hexadecimal number is read by the computer if the temperature and pressure in both tanks D and B are high?

Question 4.

Tanks A and B are taken out of use and their sensor outputs are connected to 1’s. The computer programmer must write a program to ignore these new circuit conditions. The program must check that the value read is always less than what decimal equivalent when no problem exist

 

Question 5.

In another area of the plant, only three (3) tanks (A, B and C) have to be monitored. What octal number is read if tank B has high temperature and pressure?

Multiple hardware-time-gated edge counting with cDAQ 9188 and NI-9402

$
0
0

Hello! The application I'm going to develop must do the following:

  1. It must open a gate of the device for a certain and reproducable time (order of 100 ms) with a distinct (however, changing from opening to opening) separation between openings (both time-critical, not SW-timed):                      ____~~~~~____~~~~~________~~~~~________________~~~~~___________
  2. While (and in the best case only while) the gate is opened is must count digital edges produced by the same device. A device produces no signals if the gate is closed. While the gate is opened, device produces several digital pulses randomly (!), but not more frequent than once per 50ns (20MHz): _____~_________~_~_~________________~___~___________ Output: 1, 3, 2

What concept would you advice me to use in such application if I have LabVIEW 2013 SP1, cDAQ-9188 chassis and NI-9402 digital I/O module (I can't use "Wait for next sample.vi" according to the help I read, for example)?

 

Any comment will be appreciated!

6544

$
0
0

Dear all,

This is my first time with PXIe-654x family. After several search I was unable to find an example with generation/acquisition in PXIe-6544 board. Here below is what I will try to do.

 

Clock always bellow 10 MHz. Same clock for all generation/acquisition cases. Sometime I have to change the clock.

But not during generation/acquisition.

All signals with 3.3V logic.

Channels initialy configured as input-output. Once configured channels configuration don´t change.

channels configuration are:

Input 10 Channels.

All managed as a pattern.

 

Output 4+1 chanels:

Generate a pattern using 4 channels (3.3V).

When a particular pattern in the 10-channel input generate burst in 5th output channel.

 

Work sequence is like:

1-Configure clock.

2- start generation 4-channels pattern and then maintain continuosly during all the process.

3-Monitor 10-channels input if specifc pattern appears trigger 5th output burst.(specific pattern may appear every 110 clcok pulses)->If appears generate burst in 5th output channel.(this functionality shall be maintained when pattern is generating)

4- When specific pattern appears store the 10-channels pattern in memory during 100.000 clock pulses.

5.- Once allocated download this patern for SW check in processor (this has not be done in "real time" in PXI)

Steps 4 and 5 can be repeated during several times with different pattern recognition.

 

Control air nozzles from computer

$
0
0

You guys will have to forgive me, but I'm a complete noob.

 

I would like to control high speed ejector nozzles from a computer, and I'm trying to figure out what equipment I need to make it happen.

 

I believe that I need something like:

- NI-6509

- Solenoid valves

- air nozzles

- relays?

 

I want to hook up compressed air to the system to blow compressed air out of the nozzles. The system needs to be able to operate at high speed - like turning the nozzles on and off in 10-20ms or less.

 

Thanks for any help!

Viewing all 2178 articles
Browse latest View live


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