05-01-2008 11:37 PM
05-02-2008 12:41 PM
01-21-2011 10:22 AM
Hey,
I'm having exatcly the same problem. Do you know how to solve it?
01-21-2011 09:16 PM
You will just use separate DAQmx Create Channel functions for inputs and outputs
01-21-2011 09:46 PM
And could you teel me what are these functions? I`m not finding them here in my program...
01-21-2011 11:47 PM - edited 01-21-2011 11:49 PM
First you have to actually install DAQmx. Then it's on the main pallette. Finding the function is trivial. Use the search button on the function palette if you are lost. I gave you the name.
edit - actually the full name is DAQmx Create Physical Channel and I would hope you've already taken the basic tutorial.
01-21-2011 11:48 PM
Ok. Thank you
08-30-2011 03:50 AM
Hello ,
i have a pci dio 96 , i need to update an application from nidaq to nidaqmx and i need to know how the handshake mode on a port can be configured with nidaqmx.
Before with traditional nidaq driver:
status = DIG_Prt_Config (deviceNumber, port, mode, dir);
mode indicates the handshake mode the port uses.
0: Port is configured for no-handshaking (nonlatched) mode.
1: Port is configured for handshaking (latched) mode. mode = 1 is valid for ports 0, 1, 3, 4, 6, 7, 9, and 10 of the DIO-96.
now with nidaqmx i can
configure the device port and its direction but i don't know how to configure the handshaking mode 😕
This is an example for reading from the nidaqmx example code but i can't see where the handshake mode is specified.
// Create the task
CNiDAQmxTask digitalReadTask;
// Create the digital input channel
digitalReadTask.DIChannels.CreateChannel(
port,
"",
DAQmxOneChannelForAllLines)
Could give me an example in latched AND non-latched mode?
Thank you so much.
08-30-2011 02:50 PM - edited 08-30-2011 02:54 PM
Hi stf13,
There are shipping examples that demonstrate handshaking for LabVIEW, but not for Measurement Studio C++. Still, the images of the block diagrams may be helpful:
The Measurement Studio C++ equivalent to the DAQmx Timing (Handshake).vi is something like digitalReadTask.Timing.ConfigureHandshaking(NI:: DAQmxSampleQuantityModeContinuousSamples, samplesPerChannel).
To disable handshaking, you can create a new task and not call ConfigureHandshaking(), or you can set digitalReadTask.Timing.SampleTimingType = DAQmxSampleTimingTypeOnDemand on your existing task.
Brad
10-05-2011 09:12 AM
Hi thanks for yout reply,
Finally i decided to program my application in ANSI C langage cause i don't need measurment studio.
I have tried this code as you suggested me, but i can't read data anymore...
uInt8 data[100];
int32 read,bytesPerSamp;
DAQmxErrChk(DAQmxCreateTask("",&taskHandle));
DAQmxErrChk(DAQmxCreateDIChan(taskHandle,"dev1/port3","",DAQmx_Val_ChanForAllLines));
DAQmxErrChk (DAQmxCfgHandshakingTiming(taskHandle,DAQmx_Val_ContSamps,1));
//Verify task configuration
DAQmxErrChk(DAQmxTaskControl(taskHandle,DAQmx_Val_Task_Verify));
DAQmxErrChk(DAQmxStartTask(taskHandle));
DAQmxErrChk(DAQmxReadDigitalLines(taskHandle,1,10.0,DAQmx_Val_GroupByChannel,data,100,&read,&bytesPerSamp,NULL));
The read function always return 0 in data and never read anything.
So i don't think that is the corect method for my problem so i will you explain it:
-You-ll find documents in this reply who explains what i was doing before with the traditional DAQ drivers and what i want to do now with ansi C nidaqmx library.
pin 8-12-58-62 receive a 4 duplicate signal from an ECD32 peripheral.
Each time I receive a signal i want to start the aquisition on port 3,4,9,10 (32 bits aquisition).
pin 8 -> handle 18-32 bits (When a signal is VAL rising on pin 8 it means that i can read 18 - 32 pins (8 bits))
pin 12 -> handle 34-48 (When a signal is VAL rising on pin 12 it means that i can read 34 -48 pins (8 bits))
pin 58 -> handle 68-82 (When a signal is VAL rising on pin 58 it means that i can read 68-82 pins (8 bits))
pin 62 -> handle 84-98 (When a signal is VAL rising on pin 62 it means that i can read 84-98 pins (8 bits))
The signal would permits to store the bits in memory until reading...It is a block IO operation.
I can't find any working example in ansi C daqmx library on how to configure this.
I have been a long time searching for this.
Before (With traditional daq drivers) we call DIG_Prt_Config to configure the port 3-4-9-10 in input latched mode (mode 1)
and we call DIG_Prt_Status to know the status of the handshake ...And no problem for reading...
How to do this in nidaqmx ??? I realy need ur help .
Thanks you so much for your future replies...
You can answer in french if you prefer cause i'm french.