Forum
Register Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
parkdbs

Junior Member
Registered:
Posts: 7
Reply with quote  #1 
We are using a capacitive button plugged into an analog input channel of an NI DAQ system.
The following command returns within 10 ms even without touching the button.
[startactivate, rt] = eyejoytrack('acquiretouch', startpad_button, 3.0, 5000);
We recently upgraded to the new NIMH version of ML (released April 2017) and after the upgrade this command no longer works with our button.
We have verified via daqtoolbox that our button is working correctly.
Do you have any suggestions?

0
Jaewon

Administrator
Registered:
Posts: 380
Reply with quote  #2 
Can you explain how you verified the button's operation? And what if you use 'holdtouch' instead of 'acquiretouch'?
0
parkdbs

Junior Member
Registered:
Posts: 7
Reply with quote  #3 
Thank you for the reply.
For verification, We used "analoginput_finite_samples_with_immediate_trigger.m" in the daqtoolbox.
The NI-MAX and oscilloscope also confirmed the voltage change from 0V to 7V when it is touched.
'holdtouch' also returns as if the button is being pressed.

0
Jaewon

Administrator
Registered:
Posts: 380
Reply with quote  #4 
Can you save the figure (*.fig) from the script and post it?

I don't understand your last sentence. If the button is being pressed, the eyejoytrack() with 'holdtouch' should return after 5 sec, not immediately. Is that what you meant?

Did you try the simulation mode? You can mimic Button 1-10 with the keys '1' to '0'. If the task works okay with the simulatied input, it means that the problem is in the voltage level or I/O mapping.
0
parkdbs

Junior Member
Registered:
Posts: 7
Reply with quote  #5 

Here is the figure of the recordings from the button using "analoginput_continuous_acquisition_with_immediate_trigger". The 'holdtouch' returns after the given number of milliseconds, not immediately.
The problem seems to be that in ML2, the analog input seems to be always high regardless of the actual input to the analog channel of NI DAQ.
Is there a way to save the analog input data (used for the button) to a file continuously while the ML2 is running?
FYI, the simulation mode works fine.

Thanks,
TouchFigure.png


0
Jaewon

Administrator
Registered:
Posts: 380
Reply with quote  #6 
A few more things.

What are the NI device number and the AI channel number that your button is connected to?

What is the button number in the ML menu ("Button x" in the Signal type) that you assign the above AI channel to?

What is the value of the variable, "startpad_button", in your eyejoytrack command?

What AI configuration in the ML menu did you choose? NonReferencedSingleEnded? SingleEnded?
0
parkdbs

Junior Member
Registered:
Posts: 7
Reply with quote  #7 
Here is the information on the ML problems.

What is the NI device number and the AI channel number that your button is connected to?

>> devices = daq.getDevices

devices =

ni: National Instruments PCI-6229 (Device ID: 'Dev1')
Analog input subsystem supports:
4 ranges supported
Rates from 0.1 to 250000.0 scans/sec
32 channels ('ai0' - 'ai31')
'Voltage' measurement type

Analog output subsystem supports:
-10 to +10 Volts range
Rates from 0.1 to 833333.3 scans/sec
4 channels ('ao0','ao1','ao2','ao3')
'Voltage' measurement type

Digital subsystem supports:
Rates from 0.1 to 1000000.0 scans/sec
48 channels ('port0/line0' - 'port2/line7')
'InputOnly','OutputOnly','Bidirectional' measurement types

Counter input subsystem supports:
Rates from 0.1 to 80000000.0 scans/sec
2 channels ('ctr0','ctr1')
'EdgeCount','PulseWidth','Frequency','Position' measurement types

Counter output subsystem supports:
Rates from 0.1 to 80000000.0 scans/sec
2 channels ('ctr0','ctr1')
'PulseGeneration' measurement type

Button connected to channel "AI0"

What is the button number in the ML menu?
Button 1
nidaq[biggrin]ev1
AnalogInput Channel 0

Value of variable "statpad_button" in eyejoytrack command-
1

What AUI configuration in the ML menu did you choose?
NonReferenceSingleEnded
0
Jaewon

Administrator
Registered:
Posts: 380
Reply with quote  #8 
Hi parkdbs,

Thanks for the information. It helped me rule out many things.

One thing I am still wondering about is whether you changed the AI configuration when you tested with the example scripts in the daqtoolbox. The default configuration of the daqtoolbox is 'Differential', whereas ML2's initial setting is 'NonReferencedSingleEnded'.

Can you try 'Differential' or 'SingleEnded' in ML2 and see if it makes a difference? If you want to record the button signal, I guess you can feed the same signal to AI1 and assign the channel to General Input.
0
parkdbs

Junior Member
Registered:
Posts: 7
Reply with quote  #9 
Hello Jaewon,

We did not expect that the default configuration analog inputs for ML2 are different from daqtoolbox. We switched the ML2 AI configuration to "Differential" and the problem is fixed.
Thank you very much for your help.
0
Jaewon

Administrator
Registered:
Posts: 380
Reply with quote  #10 
I am glad to hear that the problem is fixed.

The default AI configuration of NIMH daqtoolbox has to be Differential for a compatibility reason, because that is the default value of MATLAB's original toolbox. However, in practical applications where multiple devices are connected, NonReferencedSingleEnded is likely to be a more popular choice.

This AI configuration setting is the way for you to let the software know how you connected the ground wires of your devices to the NI board. It is the information only you know and you cannot just trust the default value on this.
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.