Discusiones sobre Productos NI

cancelar
Mostrando los resultados de 
Buscar en lugar de 
Quiere decir: 

programa que reconozca el device al conectar algo por usb

¡Resuelto!
Ir a solución

 

buenas comparñeros.

 

estoy progresando con mi proyecto fin de carrera, y quisiera que me hechaseis un cable, necesito un programa que me reconozca si conecto uns pen drive, en que device se me a conectado, en este caso para la placa de ni 6009, depende en que clavija de usb la inserte la placa 6009 tiene diferentes dev, dev1 dev 2...alguien sabe como puedo reconocer ese dev automaticamente¿¿¿

 

gracias, obiamente el programa que sea de labview...

 

uso labview 2009..

 

alguien tiene alguna idea, algun link o algo que me pueda servir de ayuda...no encuentro nada!!!

 

GRACIAS!

0 kudos
Mensaje 1 de 8
3.550 Vistas

Que tal Alan4,

 

Lo que te recomendaría es que buscaras utilizar property nodes, estos te pueden decir que devices has conectado y cual es el que está funcionando.

 

Para encontrar documentación sobre ellos puedes usar el Class browser que esta en la pestaña de View >> Class browser o de igual manera puedes abrirlo presionando crtl + shift + B y ahí encontraras todos los propertis que te pueden servir!!!

 

De todas maneras te agrego unas ligas que te pueden ser útiles!!

 

Saludos,

 

http://digital.ni.com/public.nsf/allkb/99F49408D8D0BD9386256D2100496728?OpenDocument

 

http://zone.ni.com/devzone/cda/tut/p/id/5338#toc2

 

http://zone.ni.com/devzone/cda/tut/p/id/5470

Luis Elias
NI VeriStand and HIL Product Manager
0 kudos
Mensaje 2 de 8
3.547 Vistas

Hola, Alan,

 

para completar la información anterior, es decir, tienes que utilizar necesariamente property nodes, te dejo el siguiente enlace:

 

http://digital.ni.com/public.nsf/allkb/AE521D8AEFD​27E1E86256F9F007DF570?OpenDocument

 

Contiene un ejemplo de cómo detectar una DAQ programáticamente en LabVIEW.

 

Saludos!

 

Jesús.

 

0 kudos
Mensaje 3 de 8
3.538 Vistas

jesus gracias pero el link no funciona!

0 kudos
Mensaje 4 de 8
3.535 Vistas
Solución
Aceptado por el autor del tema alan4

Te lo copio:

 

Programmatically Determining What DAQ Devices Are In My System

 


Problem:
I would like to be able to use LabVIEW to programmatically determine what NI Data Acquisition Devices are present in my system. Is there a way to do this?

Solution:
Yes, this can be done in NI-DAQmx and Traditional NI-DAQ. See the link to the Developer Zone Community, where the VI can be downloaded.

NI-DAQmx
The following two property nodes are necessary:

  • DAQmx System Property Node, with Device Names as the output.
    • Measurement I/O»NI DAQmx»Advanced»System Setup»System Node
    • Click on the Global Channels property and select Device Names.
  • DAQmx Device Property Node, with Active Device as an input and Product Type as an output.
    • Measurement I/O»NI DAQmx»Advanced»System Setup»Device Node.
    • Expand the Device Property node to display two properties.
    • Click on the first property and select Active Device.
    • Click on the second property and select Identification»Product Type.You can also choose Identification»Device Serial Number, if you would like to search by serial number.

If you are using CVI, you can use the following properties that can be found in the NI-DAQmx Library within the CVI environment:

  • DaqmxGetSystemInfoAttribute (Libraries»NI DAQmx Library»System Configuration)
  • DaqmxGetDeviceAttribute (Libraries»NI-DAQmx Library»Advanced»Device Control)

Please note that these properties are slightly different from those that are used in ANSI C. You can look at the ANSI C properties in the NI-DAQmx C Fuction Reference Help. In ANSI C, you have a function call for each specific property, whereas in CVI you have one attribute that allows you to select more than one property. For example, you would call DAQmxGetDevProductType to get the product type in ANSI C. In CVI, the function call would look something like DAQmxGetDeviceAttribute(ProductType).

If you are using Measurement Studio, the method to retrieve the device list is:

  • CNiDAQmxSystem::GetDevices() (Measurement Studio Visual C++ Class Libraries)
  • DaqSystem.Devices (Measurement Studio .NET Class Libraries)

Traditional NI-DAQ

  • Use the Get DAQ Device Information VI

Complete the LabVIEW block diagram as follows:

  1. Place Get DAQ Device Information within a for loop.
  2. Pass the loop iteration count, incremented by one, to the Device input of the Get DAQ Device Information VI.
  3. Choose Device Name as the Information Type input to VI
  4. If the device number is valid, the information string output will return the device name. Otherwise, the VI will return an error.
0 kudos
Mensaje 5 de 8
3.533 Vistas

y saber k canales se estan usando se podria sacar o ver???

0 kudos
Mensaje 6 de 8
3.529 Vistas

Sí, la propiedad se llama (te lo digo un poco de memoria) Active Channels.

0 kudos
Mensaje 7 de 8
3.527 Vistas

creqo que no es esa...acabo de probar y no parece...

0 kudos
Mensaje 8 de 8
3.525 Vistas