NI Home
Cart Carro | Ayuda
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
Está aquí: 
NI Home > NI Developer Zone > NI Discussion Forums


Responder
Member
Frankmt
Mensajes publicados: 2
0 Kudos

problema en puerto paralelo - inport & outport usados al mismo tiempo

buenas....estoy haciendo un VI donde uso el inport para leer el registro de datos (0x378) y al mismo tiempo estoy usando Outport y escribiendo sobre el registro de control (0x37A), pero pasa que cuando el registro de control envia un dato el registro de datos (usado para leer) se desactiva, si alguien me puede ayudar..o decir en q forma estoy haciendo mal. el VI es algo sencillo
 
estoy usando Lavbiew 7.0, tambien descarge el archivo AccessHW e hice para poder usar las funciones, pero no funciona de la forma que les estoy refiriendo,  Gracias
 
Member
Vipper
Mensajes publicados: 34

Re: problema en puerto paralelo - inport & outport usados al mismo tiempo

Hola ... efectivamente estas utlizando los bloques adecuados para las labores de lectura/escritura del puerto paralelo, lo mas recomendable es utilizar el bus de estado para recibir señales ttl del experior (0x379) y el bus de datos para enviar señales de salida (0x379), el bus de estado te permite leer 5 entradas discretas ojala esto te ayude, y en realidad necesitas recibir los datos por el bus de datos efectivamente debes escribir en el bus de control para habilitar ese bus como entrada, sin embargo debes previamente asegurarte en la bios que el modo de trabajdo del puerto paralelo sea el adecuado es decir bidireccional....... los modos son spp; epp ecp..
espero haberte ayudado

atte vipper...........
Member
santiago_cf
Mensajes publicados: 4
0 Kudos

Re: problema en puerto paralelo - inport & outport usados al mismo tiempo

yo te recomiendo que revices primero en el administrador de dispositivos de windows como esta configurado tu puerto, en mi caso para leer datos del puerto paralelo la direccion es 0x379 y para escribir datos en el puerto es 0x378. si empre la direccion de lectura es una mas que la de escritura.
 
 
espero que te sirva de algo si no te adjunto este documento que espero y te sirva
Saludos
Santiago
 

For Windows 9x:
  1. On your Desktop, right-click on My Computer and select Properties.

  2. Click on the Device Manager tab and find LPT1 under Plug and Play BIOS.

  3. After selecting LPT1, click the Properties button.

  4. Next select the Resources tab and the address should then appear next to Input/Output Range.

For Windows NT/2000:
  1. On your desktop, right-click on My Computer and select Properties.

  2. Now select the Hardware tab and click the Device Manager button.

  3. LPT1 is found under Ports (COM & LPT).

  4. Double click on LPT1.

  5. Next, select the Resources tab and the address should appear next to Input/Output Range.



Figure 3. Parallel Port (LPT1) Properties in the Windows Device Manager

The base address is generally hex address 278, 378, or 3BC. There are several registers associated with the parallel port but for purposes of simple output we only need to concern ourselves with the Data register. This is the first register in the I/O range, and so is located at the base address. The 8 bits in this first register map directly to the data lines (2-9). All we need to do is use the Out Port.vi to write the desired values to the port as shown in Figure 4.


Figure 4. Using Out Port.vi.


Common Errors
  • "Capability not supported" error form In Port.vi or Out Port.vi

    On Windows NT and 2000 machines, additional AccessHW drivers are required. Refer to the Developer Zone Example: Port and Memory Utilities for Windows. Also, make sure you use the In Port.vi and Out Port.vi that come with the AccessHW driver and not the ones from the vi.lib.

Refer to KnowledgeBase 0TL70ATL: Using the Parallel Port as an Input/Output Channel for more information about regarding parallel ports and LabWindows/CVI.
        Using the Data lines for Input



      Figure 6. Using the control and status lines for input.


      Common Errors
      • "Capability not supported" error form In Port.vi or Out Port.vi

          Some parallel ports can be configured to use the data lines as inputs. It depends a great deal on the way the manufacturer designed the parallel port. With some models the data lines can be read the same way we read the control lines, by driving them to high logic so they will take on the value of an external signal. However, most parallel ports require that you set the direction bit for input. This is bit 5 in the Control register (base+2). If the port is capable of it, setting the direction bit high has the effect of making the lines tri-state so it can be driven externally. Sometimes it is also necessary to toggle bit 6 high or low. However, it should be noted that some manufacturers actually lock these bits so that software cannot change them. An example is shown below in Figure 7.


          Figure 7. Using data lines for input.


          To test whether your data lines can be used for input, try the following:
          1. Set bit 5 of the control register high (at base address+2).
          2. With nothing connected to the port, write a couple of values to the data port, and read each back after you write it.

          If the reads DON'T match the writes, your port is probably bidirectional. Setting C5 disabled the data outputs and you're reading the open inputs of the data-port buffer.

          If the reads DO match the writes, your port isn't bidirectional. The data outputs are still enabled, you're reading back what you wrote, and you won't be able to read external signals.

          If it is possible to use your data lines for input, then you just need to set control register bit 5 high and read from the value of the data lines at the base address.


          Member
          luarken
          Mensajes publicados: 16
          0 Kudos

          Re: problema en puerto paralelo - inport & outport usados al mismo tiempo

          alguien tiene las fotos que no aparecen aki???/

           

          kiero meter datos por el puerto paralelo!!!!!!!

          por los datos de control y de estado

          o bidireccional como sea

          alguien me puede ayudar?

          Member
          Jdias
          Mensajes publicados: 175
          0 Kudos

          Re: problema en puerto paralelo - inport & outport usados al mismo tiempo

          Buenas tarde,
           
          Las fotos no estan mas disponibiles, pero es posible que se comprende sin tener las imagenes.
           
          Saludos
          Member
          Vipper
          Mensajes publicados: 34

          Re: problema en puerto paralelo - inport & outport usados al mismo tiempo

          hola te adjunto unos Vis con los que trabaje hace algun tiempo con el puerto paralelo.
          El programa principal es puerto paralelo.vi los otros son subvis.
          El programa escribe datos por el registro de datos y lee por el registro de estado.
          saludos Vipper


          Al usar este sitio Web, usted acepta los Términos de Uso del mismo. Por favor, lea estos Términos de Uso cuidadosamente antes de usar alguna parte de este sitio. Diríjase a este enlace para obtener información sobre la política de violación a los derechos de autor de ni.com.
          Mi Perfil | Privacidad | Aviso Legal | Comuníquese con NI © 2011 National Instruments Corporation. All rights reserved.    |    Enviar esta página Enviar esta página