LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

parallel port control of stepper motor (VISA problem)

I am trying to control a stepper motor using two pins of a parallel port. Unfortunately I cant write directly to the parallel port register because I am using a USB-to-parallel driver. I am trying to use visa but I am having so many problems as follows:1) when I write a byte to the pins and then write a different byte, only the first byte remains and the new bytes aren't written. 2) sometimes I have errors like timeout or visa session open while its actually closed. At first I tried shorting pins 11 and 12 as it said in (http://digital.ni.com/public.nsf/allkb/B937AC4D8664E37886257206000551CB) and then I tried shorting pins 1 - 13, 10 - 16, 11 - 17, and 12 - 20 as recommended by a discussion here and I am still facing a problem of only the first byte written and can't be changed, Whats the best way to do this?? I am using simple Write-visa, Close-Visa command subsequently

0 Kudos
Message 1 of 8
(3,741 Views)

Hello aabba002

 

Thank you very much for choosing National Instruments!  Can you please provide me with the model number of your motor, which version of LabVIEW you are using and which operating system you are running LabVIEW in?  Can you please either take screenshots of the errors you are receiving and post them or take notes of error codes reply with them?  That will be helpful to me to address your individual issues.  I understand you are using a USB to parallel port adapter but can you tell me if any of the following documentation is useful to you?  (Just for my interest, can you please provide the model number of the USB-to-Parallel port adapter?)  Is there another PC with a parallel port that you could test your code on?

 

How Do I Use the Parallel Port in LabVIEW?
http://digital.ni.com/public.nsf/allkb/B937AC4D8664E37886257206000551CB

Configuring Serial and Parallel Ports with VISA
http://zone.ni.com/reference/en-XX/help/371361G-01/lvinstio/visa_serial_parallel_ports/

Setting Individual Bits for the Parallel Data Port Using LabVIEW
http://digital.ni.com/public.nsf/allkb/C80752C53094C296862565F3007AC765

 

There appears to be developer zone where someone has controlled a stepper motor with the parallel port but a user has stated they are having issues using a USB-to-Parallel port adapter.

 

Stepper Motor Control (Parallel Port)
http://zone.ni.com/devzone/cda/epd/p/id/3611

 

Please keep me in the loop!

Sincerely,

Greg S.
0 Kudos
Message 2 of 8
(3,714 Views)

Hi aabba002,

 

Did you manage to controle you motor via your serial port?

i am trying to do the same but ... i can't even start .... without the servo and the motion controler it seems sooo complicate .. but sheaper for me 🙂

 

please, let me know is there in any new

 

thanks 

 

amayas

0 Kudos
Message 3 of 8
(3,525 Views)

Hi amayas,

 

What problems in particular are you experiencing? Were you able to take a look at some of the documentation posted by Greg S.? Let me know some specifics of the errors you're facing and hopefully I'll be able to offer some guidance.

 

Best,

 

Message 4 of 8
(3,500 Views)

Dear Courtney,

 

thank you for your answer.

 

my first problem (i have several for now !!!) is how to get the addressof my RS223 port to be able to contact with him.

I am using a USBto RS232 converter (my RS 232 has 9 pins) and it is an U232-P9 addaptor.

 

please, can you help?

 

thank you

 

amayas

0 Kudos
Message 5 of 8
(3,479 Views)

When you plug the adapter in, a new com port will show up in windows device manager and in MAX (Measurement and Automation Explorer), unplug it, the port will disappear. Just take note of this port. The VISA Resource Name that you have for any serial port communication has a pulldown menu when you click on the arrow on it's right side. You select the port from the list.

Message 6 of 8
(3,473 Views)

Hi Dennis_Knutson

 

wonderful answer !

igot the com address of my RS232 ! perfect !!!!!

 

now, i have an other question ... 

the RS232 sends only high / low wignal (digital signal)

but, i have to send an anlog courant to make the motor turne,

 

does this mean that i have any way to use an amplifier to make my motor turne?

 

 

thank you, all

 

amayas

0 Kudos
Message 7 of 8
(3,457 Views)

This is what happens when you post the same question in multiple threads and when you don't start a new one.Smiley Mad See the other one you started.

0 Kudos
Message 8 of 8
(3,454 Views)