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

Current and voltage of NI-9482

$
0
0

How much are the current and the voltage released from NI-9482 with the attached VI (simplest VI)?

The user manual of NI-9482 tells us the maximum current and voltage; 2.5A max at 30VDC, 1A max at 60VDC, and 2.5A max at 250Vrms. Is the maximum current applied with the simplest VI? How to control the magnitude of electrical current?


How to get input/output using the NATIONAL INSTRUMENTS USB 6008 - MATLAB

$
0
0
I was wondering if anyone could help how to get input/output using the NATIONAL INSTRUMENTS (NI)USB 6008 device please in MATLAB. While we think we have been able to write to it, we have not been able to read from it. We need help with both?

NI-6509 Python performance issue when writing to Output

$
0
0

Hi All, I'm using an NI-6509 / PCI card   to generate encoder pulses. All we do is write to the outputs every 2ms. It seems the write is a blocking call, and when we check the min/max time for a write is varies from 0.1ms to 1ms, sometimes we even get write times up to 2ms, which causes some issues.

 

So I have 2 questions:

1.  Is there a way to make this call "non-blocking"

2.  Why does the call take so much time

 

Here is the Python code to create the task:

    def__init__(self😞
        try:  
            self.OutputStates = [False,False,False,False,False,False,False,False]  # NI DAQ port 0 initial

            # Configure and setup the tasks
            self.task0 = nidaqmx.Task()
            self.task0.do_channels.add_do_chan("Dev2/port0/line0:7,line_grouping=LineGrouping.CHAN_PER_LINE)
            self.task0.start()

            # set default values
            self.task0.write(self.OutputStates)
        exceptExceptionase:
            self.task0 = None
            print("NationalInstrumentGpio::__init__() exception: {}".format(e))



Here is the write method, called every 2msec

    defWriteOutputs(self😞
        try:  
            self.task0.write(self.OutputStates)
        exceptExceptionase:
            print("NationalInstrumentGpio::SetOutputState() exception: {}".format(e))
            raiseNationalInstrumentGpioException("NationalInstrumentGpio::SetOutputState() exception: {}".format(e))
 

 

 

LabView and digital outputs

$
0
0

Can anyone help , I need to send a digital output to the ni 9474DAQmx, I can get the unit to respond to the self test no problem. When I write to it does not respond. I have tried DAQmx native and DAQ assistant but to no avail. Here is one such attempt, with the wile loop greatly simplified.

HSDIO acquisition sample/ref clock help

$
0
0

I am working on trying to do some data acquisition with an NI-6545 installed in a 1095 chassis. I am supplying the chassis with a 10MHz reference source that is generated externally and also distributed to an A to D converter which uses the same clock as an encode clock. The A to D is constantly outputting digital data when powered on and being supplied the 10Mhz clock. I can supply the A to D with various high precision signals both DC and AC. When I do a continuous read, or any read, from the A to D over the 6545 then reassemble the bits, the data I am getting back has significant distortion or noise. If I mess around with my sample rate enough the distortion eventually goes away and will work fairly well until things are powered down and turned back on or some other setting is changed which causes the code to recompile. This is leading me to believe that it has something to do with the sample rate and reference clock synchronization or something. I need some ideas on how I can resolve the issues. I have attached how I am doing the acquisition now, and a few images of what the "noise" looks like.

 

I tried using HSDIO SClk Relative Delay, but with the sample rate set at 200MHz (which is what I want) that gives me +/-5ns and advancing/retarding the delay in 1ns increments didn't seem to have any effect at all. 


One of the digital signals returned from the A to D is the clock signal it is using for the encoding, so I don't know if I could somehow use that for synchronizing my ref clock/sample rate to help eliminate delay or skew? Or if I can somehow trigger to read the data from the other DIO lines based on the clock signal DIO line?

 

Channels in Data Doesn't Match Channels in Task

$
0
0

 

allen716_0-1651574559843.png

allen716_1-1651574617830.png

 

Hello everyone.

I connect the NI9213 and 9474. I want to create an analog input from 9213 and digital output from 9474 (See in the attached file). But Channels in Data Doesn't Match Channels in Task.

Please help me with it.

Thanks a lot.

USB 8451 - can not use SPI - device is recognized by DAQmx as IO port only

$
0
0

Hallo,

 

I have a problem with an 8451 SPI interface. It is connected to my system (labview 2019) and is recognized by the Measurement and Automation explorer - but then only for use of the digital I/O ports.

 

When trying to use the dedicated 845x drivers with SPI support in my labview program, no device is found.

 

How can I make sure that the device is available for the dedicated driver and not claimed by DAQmx?

(DAQmx is required for another instrument).

 

How to connect boolean case structure to multiple channel digital output?

$
0
0

allen716_0-1651833170735.png

 

 

allen716_2-1651833565565.png

Hello,

I can connect the case structure to a single channel of digital output. Then I want to control two digital output channels at the same time, I connected the case structure to multiple channels, but it told me I connected two different types.

My question is: How can I connect the case structure to multiple channels?

Thanks a lot.

 

allen716_1-1651833207467.png

 


How to control the 1 boolean N lines in digtal output?

$
0
0

allen716_0-1652005785115.png

 

Dear All,

 

I want to control Line 0:2 at the same time. But after I set the True of the date array, the LED of NI 9474 was still not lighted.

How to solve this problem?

allen716_1-1652006233279.png

 

Thanks a lot.

NI 9485 controlling heaters using Python

$
0
0

Hello,

I am attempting to use an NI 9485 SSR module to control a set of Clippard electronic valves I am using for an experiment. Each valve will send a different type of fuel into a combustion chamber for my experiment. 

 

My idea was to use an NI cDAQ-9189 with the SSR module connected to a PC, and write a python script that could send a true/false signal to the SSR in order to only turn on the one valve that I need with the others remaining closed.

 

However, I am unable to get a response from my SSR. The following codes are what I have written so far:

 

First, I used a script from https://github.com/ni/nidaqmx-python to test if my hardware was present.

import nidaqmx as ni

def query_devices():
local_system = ni.system.System.local()
driver_version = local_system.driver_version

print('DAQmx {0}.{1}.{2}'.format(driver_version.major_version, driver_version.minor_version,
driver_version.update_version))

for device in local_system.devices:
print('Device Name: {0}, Product Category: {1}, Product Type: {2}'.format(
device.name, device.product_category, device.product_type))


query_devices()
>> DAQmx 21.8.0>> Device Name: cDAQ9189-1CEF139, Product Category: ProductCategory.COMPACT_DAQ_CHASSIS, Product Type: cDAQ-9189>> Device Name: cDAQ9189-1CEF139Mod1, Product Category: ProductCategory.C_SERIES_MODULE, Product Type: NI 9485

 

Then, following the digital output example I was able to come up with the following code for actually sending a command to the SSR. Currently I am only working with one valve, so I only have port 0, line 0 occupied. I also have a voltmeter in parallel to my valve to check for voltage flow across the connection. 

import nidaqmx

task = nidaqmx.Task()
task.do_channels.add_do_chan('cDAQ9189-1CEF139Mod1/port0/line0')
task.start()

value = True
task.write(value)

Which prints:

>> 1

Then I stop the task and close it.

task.stop 
task.close()

The documentation states that the relay is normally open, so I assumed that I could just start the task and keep the relay open by setting it to True. However, I never see any voltage flow through the circuit, nor does the valve open/close. 

 

I also attempted to test the panels using NI MAX, but got no response from the SSR either. Didn't matter if I set the port to high or low.

Screenshot 2022-05-13 145929.png

The final goal is to create a GUI application that would allow me to control all the valves in my system from my PC, without lugging around a huge switchboard and control panel. But as of now, I can't even control a single valve.

 

Can anyone provide me with some insight as to why my method is not working? I am pretty new to python still, so any help will be much appreciated. 

DIO select direction

$
0
0

Hello,

I am using DIO-6361. In MAX I can select the direction of the Digital lines from Input to Output and vise versa. How do I do that using LabVIEW?

For example I need to pull Port1/Line0 to low and then release that Line0. In MAX I can release the Line by selecting "All Input".

 

I use Digital output to pull Port1/Line 0 to Low

lvrat_0-1652486106170.png

Would just reading the Line0 in LabVIEW release the line?

Thanks!!

 

Additional letters in NI part number on the device

$
0
0

Why there are additional numbers in the NI part numbers. For ex. original part number is 779975-01, whereas on the hardware it is mentioned as 779975E-01L. Any significance to those numbers. Are they same?

sbRIO-9627 and 9626 RMC Connector Pinout Compatibility

$
0
0

We are planning on developing a custom RMC board compatible with both the sbRIO-9627 and the sbRIO-9626. Looking at the connector pinout info on the respective user manuals of both boards we noticed that some of the pins labeled GND on the 9627 are labeled as RESERVED in the 9626 (for instance pins 2 and 8). My question is whether it would be fine to ground the pins labeled RESERVED in the 9626 as opposed to leaving them open or would we potentially run into some problems by doing that.

 

Thanks

 

Screenshot 2022-05-18 122410.pngScreenshot 2022-05-18 122437.png

NI-USB 6008 Digital Output for SSR control

$
0
0

Hello I'm having a bit of an issue with controlling a SSR with my NI-USB 6008. I'm trying to control a G3NE-205T-US-DC5 Control SSR with the Digital Output from the USB 6008 which as far as I can tell should have no problems providing the 5VDC and the SSR needs 5mA of Input current which seems to be pushing the capabilities of the Analog Outputs on the 6008 so I've instead tried to turn to the Digital Outputs. Connecting one of the outputs and GND directly to the SSR terminal 3 and 4 unfortunately only gives 1.2V on High and connecting and ammeter shows it giving .8mA, im not entirely sure the reason for this so I've attempted two wiring configurations from the 6008 user guide (seen below). In the first configuration I can't seem to get any pull up resistor value to work correctly, and in the second configuration (#1 in the second picture) I've also tried a few different resistor values in series but to no avail, the closest I got was having no resistor in series and getting 4.31 V and apparently 15mA through the ammeter (which as far as I can tell should have been enough to trigger the SSR and is somehow more mA then the 6008 can output. As a final note hooking the 5V and GND from the 6008 to terminals 3 and 4 of the SSR works as expected turning on the SSR. I think at this point I may just be missing something extremely obvious but any help is appreciated.

AlexiaC_0-1653091969297.png

AlexiaC_1-1653092007325.png

 

 

NI 9485 for Analogue Output

$
0
0

Hello,

 

Our student team was donated a NI 9485 module for our CompactDaq to control 7X 24V DC 105mA solenoid valves.  I understand this is a 60V digital relay.  After reading through the spec sheets and playing with the device in MAX and Labview, I'm not sure if/how I can trigger a simple switch of this DC signal to the valves.  It looks possible per this snip from the getting started guide with the use of flyback diodes:

JackOswald_0-1653157739160.png

Looking at the example digital output VI NI provides, is it as simple as providing 0 or 1s to trigger channels?

JackOswald_1-1653158801096.png

 

 


Logic Analyzer VP-3620A manual required?

$
0
0

Hello,

I'm new here but I've a modest question I'm searching a manual for the ultra old National logic analyzer VP-3620A? Can anybody help me in this way?

And no I don't want to buy a new one this is only for a waste project in a case that a CD-Player have a deathcounter build in so my suspicion.

 

Thank you &

Best Regards

Volker Hois

Writing to two output channels simultaneously crashes nidaqmx (python)

$
0
0

Hello everyone

 

I'm a new user of NI boards and am a bit lost with a dual stream_writers problem that I can't seem to find a solution to.

 

I'm trying to use a NI 6229 card with 2 x BNC-2090A (or even a single one) to send periodic simultaneous TTL pulses. One TTL pulse controls a speaker (plays sound waves) the other opens a port for a water release valve.

 

Independently, these two tasks are easy to do using the

 

 

 

 

 

 

 

nidaqmx.stream_writers.AnalogSingleChannelWriter()

 

 

 

 

 

 

 

function and these individual commands:

 

 

 

 

 

 

 

water_Writer.write_one_sample(5) audio_Writer.write_many_sample(tone)

 

 

 

 

 

 

 

But when I run them in series (i.e. without closing the first one), I get this error when the second task tries to write:

 

 

 

 

 

 

 

DaqWriteError: The specified resource is reserved. The operation could not be completed as specified. Task Name: _unnamedTask<4>

 

 

 

 

 

I've added a 2nd BNC-2090A breakout board (see ao2 above) and I get the same error. I do have a 2nd 6229 card - but! my computer doesn't have any more slots to insert it into.

 

Should I not be using the stream-writers function to write TTL output? 

 

Any advice is much appreciate! As I said, I'm quite new at NI + python configuration and a bit lost.

Thanks so much,

Catalin

 

Here's the entirety of my code, including a function that converts frequency values to oscillations playable via TTL pulse:

 

 

 

 

 

 

######################################################## #################### HYBRID RUN ######################## ######################################################## def make_tone(f, amp, duration): fs = 200000 # 200kHz (Sample Rate) T = 1/f Ts = 1/fs x = np.arange(int(fs*duration)) y = [ amp*np.sin(2*np.pi*f * (i/fs)) for i in x] y_new = np.tile(y,1) return y_new # import nidaqmx # Initialize speaker task; audio_Task = nidaqmx.Task() # audio_Task.ao_channels.add_ao_voltage_chan('Dev3/ao0') audio_Task.timing.cfg_samp_clk_timing(rate = 200000, sample_mode=nidaqmx.constants.AcquisitionType.CONTINUOUS) # audio_Writer = nidaqmx.stream_writers.AnalogSingleChannelWriter(audio_Task.out_stream, auto_start=True) # Initialize water task water_Task = nidaqmx.Task() water_Task.ao_channels.add_ao_voltage_chan('Dev3/ao2') water_Task.timing.cfg_samp_clk_timing(rate = 200000, sample_mode=nidaqmx.constants.AcquisitionType.CONTINUOUS) # water_Writer = nidaqmx.stream_writers.AnalogSingleChannelWriter(water_Task.out_stream, auto_start=True) #################################################### # realtime streaming with callback amp = 0.003 # tone amplitude in ? duration = 0.1 # tone duration in seconds; ctr=0 freq = 1000 tone = make_tone(freq, amp, duration) # duration = 50000 # time in 100000Hz time base (?) for k in range(25): for p in range(duration): water_Writer.write_one_sample(5) audio_Writer.write_many_sample(tone) # water_Task.stop() water_Task.close() audio_Task.stop() audio_Task.close()

 

 

 

 

 

 

 

 

Ni USB-6525 Delivering

$
0
0

We has planed to use the USB-6525 but I was informed that there are more than 3 months delivery time.

Does anyone know any alternative?

SHC68-68 EPM vs SH68-C68-S

$
0
0

Hi everyone,

 

I am using PCIe-7852R to generate square ware at 1MHz. I have two cable connect to the board
1. SHC68-68 EPM

2. SH68-C68-S 

However, the output of two cables have different: (you can check in the figure).
could anyone help me to fix the problem with the output from  SHC68-68 EPM?
I want the square wave output as SH68-C68-S 


Thank you very much

Unable to get signal out of digital I/O channels on 9401.

$
0
0

I'm trying to trigger two separate relays to open and close a valve by sending a long ttl pulse on a button press. I get a constant 5v signal for 5 seconds on channel 0 but for channel 1, I only get a short pulse at the end of the 5 second run.

I have switched the channels and got the same result, with the relay on channel 0 working fine but channel 1 not. I have moved the wiring to different pins for channel 2 and it still didn't work.

I have 9401 with a 9924 screw terminal block on top, plugged into a cDAQ 9178 chasis. I have relay 1 wired to terminals 1 & 14 and relay 2 wired to terminals 3 & 16. They both use identical code with the exception of the channel selected.

Viewing all 2194 articles
Browse latest View live


Latest Images

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