From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
05-25-2009 11:43 AM
I am trying to control a OMHT23-400 stepper motor through a 3540M motor drive using a Moschip PCI Parallel Port. I created a program to send alternatilng pulses to the motor and rotate it a desired amount of degrees. The address of the stepper motor in my computer is I/O Range BD00-BD07. The same program worked in another computer who's parallel port address was I/O Range 0378-037F. I dont know why the program is working in the first computer and the same program wont work in this one. Thank you for your help.
PS: the program that i wrote is attached below.
Guillermo Naranjo
Physics/Space Science
Florida Institute of Technology
Phone: 768 537 6392
e-mail: gnaranjo2007@fit.edu
Solved! Go to Solution.
05-25-2009 02:26 PM
It seems as if you are correctly specifying the address for the Out Port VI. The problem may be that you do not have data dependency established to control which Out Port runs first. LabVIEW does not execute left to right, top to bottom, or any other direction. A VI will execute once all of its inputs have been provided with data. Thus, in your sequence frame (which is unnecessary), there's no way to tell whether the left one or the right one will execute first. Typically the error clusters are used to establish execution order. See attached mod.
Other comments:
05-26-2009 03:30 AM
Dear Gant88,
One reason for your VI not working might be the following: function port out.vi seems to accept the memory address as I16 data type (this is what I noticed in LabView 7.1). As long as your memory address is 0378 (in hex) is OK, but the upper positive limit for I16 is 7FFF. So your BD00 address is coerced or transformed to something else.
I had this kind of a problem with my program for controlling stepper motors through parallel port: as long I was working on a PC (LabView 7.1) that had port address 0378 was OK. But then I switched to laptop that had parallel port on PCMCIA with FE08 address and I could not run motors any more. I checked the signals on the parallel port and realised that there are no changes or they are completely different from what I wanted to appear there. It took me several days to figure out the reason for this behaviour. Finally I used the accesshw library and made my own port in and port out that work fine on any memory address.
Actually all this is described here:
http://zone.ni.com/devzone/cda/epd/p/id/1132
In LabView 8.5 I noticed you can define the memory address as I32 as well.
regards,
Bojan
05-26-2009 09:01 AM
Excellent catch, Bojan. Learned it the hard way, huh?
I suspect that if VISA were used to read/write the parallel port this probably wouldn't be an issue.
05-26-2009 09:19 AM
05-26-2009 09:29 AM
Bojan,
I am having the same problem you had with your laptop. How did you use the access hw to create your own port? I didnt understand very much the explanation. Thank you.
05-26-2009 09:31 AM
A search will yield lots of results. For example:
Using VISA to Access the Parallel Port in LabVIEW
Accessing Parallel Ports with VISA
Using the Parallel Port in LabVIEW (note that document's images are not displayed - this needs to be fixed by NI web site maintainers.)
Parallel Port Communication (this is just the VI provided in the the first KB article resaved for more recent versions of LabVIEW.
...
05-26-2009 09:39 AM
05-26-2009 09:46 AM
Dear Gant88,
first download and unpack accesshw.zip as instructed (you can also unpack it to the directory where your .vi files for this projet are, thugh this is not good practice).
I attached my write_port and my read_from_port. (LV 7.1)
In my case I wanted to write (or read) 32 bit integer from the port, for this purpose I am writing (or reading) three (data, status, control) bytes at different locations. You will figure out.
Take care not to have any printer installed (in win xp) on parallel port, because windows will do some check-ups on printer from time to time. This will interfere with your program.
Try and let me know.
regards.
Bojan
05-28-2009 09:47 AM