Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading states of usb-6501 kit from command prompt?

Hi all!


I have been planning to use USB-6501 kit as one part of my test bench. There will be need of checking state of some relays on  tested  unit.
I would like to connect  6501  to those relays and read those states using bare command prompt commands like readDigPort.exe

1. What software in need to install minimum to use writeDigPort.exe or readDigPort.exe commands at command prompt??

Those commands should be included in python script.

2. Is there such Linux commands also included somewhere in installation media/net ?

I am Using Fedora 3 ( Comedi not supporting 6501 ?)

3. I need only easy way to set and read values from 6501 ports which are my possibilities to do it?

Thank you!
Narsu Man


0 Kudos
Message 1 of 6
(4,245 Views)
 

Hello,

Here are the answers:

1) You need NI-DAQmx Base driver for Linux. You may find the driver from web:

https://www.ni.com/en/support/downloads/drivers/download.ni-daqmx-base.html

Supported platforms and installation instructions can be found from here:

http://zone.ni.com/devzone/conceptd.nsf/webmain/42b73a7b82f0fec786256fb1007227ec 

Please read the readme-file before installation.

 

2 & 3) LabVIEW and C-examples are shipped with the driver. C examples are installed by default to /usr/local/natinst/nidaqmxbase/examples. Use the example as a basic body for your application. NI-DAQmx Base Function reference help.

 

Vesa K

National Instruments

0 Kudos
Message 2 of 6
(4,225 Views)
Thanks for info Vesa!

Now I could compile those C-examples writedigport.exe and readdigport.exe, but there is still something odd..
We made also change to writedigport.c file so it could use arguments like example below
This code version will set output channel 0 all lines to high state.

C:\writeDigPort 255
Given arg: 255            <-------To get to this point takes about 20 seconds!!!
Data to write: 0xFF

C:\

But when I give such command it takes about 25 seconds to set lines??
What takes so much time? Is there something to do with USB
Task creating takes some time or what?

I would expect <1 second time to set lines?

Thanks,
Marko "Narsu" Rintamäki










0 Kudos
Message 3 of 6
(4,219 Views)
Hello,
 
The update time should be less than that. This might be a compatibility problem. Officially Daqmx Base supports only following OSs:
Mandrake linux 10.0 Official
SUSE LINUX Professional 9.2
Red Hat Enterprise Linux WS 3
What kernel you are using? Kernel 2.6 requires Daqmx Base 1.5. You may meet problems with version 1.4 and kernel 2.6. Please upgrade your driver to 1.5.
 
Recompile and test you application after upgrade. Please check that digital lines actually changes in the device.

Vesa K
National Instruments
0 Kudos
Message 4 of 6
(4,208 Views)
Hi again!

I could compile sources for windows writedigport.exe. It works but is very slow... 😞

BR,
Marko Rintamäki
0 Kudos
Message 5 of 6
(4,204 Views)

And continues....


I could install Nikal drivers  to Fedora 3 linux and tried use WriteDigPort and ReadDigPort examples... But there is still slow update speed for digital output line states same problem with windows versions.... Is there some major problem which I haven't understand?

If I run WriteDigPort command which tries to write value 0x55 to Channel 1 outputs then  I measure voltage levels at 6501 node outputs it takes about ~25seconds to get states updated to correct voltages??? Is there something to do with task creation functions?

Have you any clue on that???

BR.
Marko Rintamäki
0 Kudos
Message 6 of 6
(4,190 Views)