zero-tolerance Posted October 25, 2006 Report Share Posted October 25, 2006 Hi everyone. I'm involved in a project where I'm controlling a stepping motor via a Unipolar Stepper Motor Board (manual provided on the link. I only want to controll the direction and the speed of the motor and I'm using a Hall affect detector for the zero position of the motor. (i.e. i'm basically using it as a referanc position) http://documents.rs-components.com/rs-bin/...900766b802ee6cd Anyway, my main concern for now is to talk to the Motor controller Board through the parallel port of my PC. I am using Windows 200 Platform (I don't think it would make a differene). I have previously used LabView when I was involved in a different project but then I used srial port as the link with the hardware I had. What I really need is to directly controll 3 pins of the parallel port: 1 for direction, 1 for speed and 1 for zero position. Two of the pins will be connected to the motor Board and the third one to the Hall Affect detector. So, does anyone know how to directly access th parallel port pins through LabView. Thank you Quote Link to comment
labviewgeek Posted October 27, 2006 Report Share Posted October 27, 2006 So, does anyone know how to directly access th parallel port pins through LabView. You can write to the parallel port using Out Port. Please see the examples at the locations listed below. The address of the parallel port is x378. Parallel Port Read and Write Loop VI: labview\examples\portaccess\parallel port examples.llb Parallel Port Additional Data Register Inputs VI: labview\examples\portaccess\parallel port examples.llb Quote Link to comment
zero-tolerance Posted October 27, 2006 Author Report Share Posted October 27, 2006 You can write to the parallel port using Out Port. Please see the examples at the locations listed below. The address of the parallel port is x378.Parallel Port Read and Write Loop VI: labview\examples\portaccess\parallel port examples.llb Parallel Port Additional Data Register Inputs VI: labview\examples\portaccess\parallel port examples.llb accessing parallel port I don't have a problem with, but what I need is to use 3 parallel port pins as I/O pins, i.e. I need to send a pack of 0's and 1's to one particular pin only (lets saypin 2) because I don't want to use the hanshaking signals etc on the paralel port. Also I need to recieve a signal HIGH from the Hall affect where in computer language that would be 1. Would anyone happen to have an example?? Thanks in advanced Quote Link to comment
Falevoz Y. Posted October 27, 2006 Report Share Posted October 27, 2006 Hi! That the way I used to do that : port 2 to 9 are TTL out and 19 to 30 are associated gnd. by! Yann Quote Link to comment
wha Posted October 27, 2006 Report Share Posted October 27, 2006 accessing parallel port I don't have a problem with, but what I need is to use 3 parallel port pins as I/O pins, i.e. I need to send a pack of 0's and 1's to one particular pin only (lets saypin 2) because I don't want to use the hanshaking signals etc on the paralel port. Also I need to recieve a signal HIGH from the Hall affect where in computer language that would be 1. Would anyone happen to have an example?? Thanks in advanced Hi zero............ here one more example - how to talk to chip via SPI ( eg. g. 16Bit) Hope this helps to understand the sequential Operation with LPT - Port Regards Werner Download File:post-4460-1161958716.zip Quote Link to comment
zero-tolerance Posted October 27, 2006 Author Report Share Posted October 27, 2006 Hi zero............here one more example - how to talk to chip via SPI ( eg. g. 16Bit) Hope this helps to understand the sequential Operation with LPT - Port Regards Werner Many thanks for your reply "wha" and "Falevoz Y.", I am still on the process of understanding the program "wha" gave me. It looks probably just what I need (even though mine is much simpler than that, since all I need is 2 output ports to talk to my motor controler board and 1 input from the "hall effect" i.e. I will only recieve a HIGH (5 V) when triggered and the rest of the time it will be LOW (0 V) and also I'm not too much worried about the timing issues). I haven't been involved in this type of work before and even though I have done some work on LabVIew ( for about 2 months ) I am still at the beginners level. Thanks again. Quote Link to comment
zero-tolerance Posted November 6, 2006 Author Report Share Posted November 6, 2006 Hi again. I just tried making a simple example for talking to the parallel port pins but so far unssuccesfull. Below is an attachment of just a simple example that I wanted to see wheather I could drive at least one of the pins High or Low. On the attachment VI all I'm doing is sending a 85 decimal number to the input port, which means that I am senidng 10101010 to the port. I am checking the pins using a Voltmenter. If its LOW then I should get below 2.5 V and if its HIGH then I should get anything above 2.7 (I think). When I check the D0 to D7 Pins i.e. pins 2 to 9, I get all high (they are roughly 4.57 V). My understanding so far is: 10101010 has 8 bits, meaning that I am sending HIGH to pin 2, LOW to pin 3, HIGH to pin 4, LOW to pin 5 etc.. is this correct?? The Parallel ports address is 378 (hex). Just to make sure I have attached the parallel ports addresses the way I see it on the system, since I'have 2 types of addresses showing on the screen. Any help would be appriciated. Thank you again to everyone who helped me so far. Download File:post-4068-1162825836.vi Quote Link to comment
cyrik Posted December 25, 2007 Report Share Posted December 25, 2007 Write 888 for the "port 378" 378 is in hex and what you need to enter is a decimal number. Try that or do a conversation operation. A+ EDIT: DOH!!! I'm too late I hope 2 years later you have find the answer hahah!! sorry I dont see When he post his question! Quote Link to comment
LAVA 1.0 Content Posted December 28, 2007 Report Share Posted December 28, 2007 QUOTE(cyrik @ Dec 24 2007, 02:51 PM) DOH!!! I'm too late I hope 2 years later you have find the answer hahah!! sorry I dont see When he post his question! It's fine to answer! that's what LAVA is about; helping each other out. Someone may stumble upon this some day and solve a problem. I opened the VI to understand your answer and noticed one thing; the display format for the constant "378" was set to 'hex' on the block diagram, but the radix was NOT visible . So I guess the vi was technically correct, BUT the radix should be set to visible whenever using the 'non-default' display format for a numeric constant. Nice catch, and keep on posting! http://lavag.org/old_files/monthly_12_2007/post-949-1198759485.gif' target="_blank"> Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.