04-01-2011 09:01 AM - edited 04-01-2011 09:02 AM
Hi,
I am new in using serial communication in labview to control an instrument.
I have to control a stepper motor, the programming manual for which is given by the company.
I have to write the commands in the write string to the instrument.
But I dont know how to start....
Any suggestion would be of immense help...
An example program would be great...
Thanx.. 🙂
04-01-2011 09:07 AM
the example finder (Help>Find examples) Hardware input and output/ Serial show both Basic Serial Write and Read.vi and Advanced Serial Write and Read.vi.
After goinging through those most of your questions should be cleared up but if you need more specific info feel free to ask.
04-07-2011 05:36 AM
Well thanx.
I checked out the examples and am able to control the motor by writing the commands in the write string.
But the problem arises when i tried to integrate all the movements of the motor, ie, different commands in one code.
I have created many sub VIs for the various movements of the motor and am calling all the sub VIs in one higher level VI.
The following 2 errors keep occuring everytime i try to run the code.
Error -1073807313 occurred at VISA Write in X.vi->inc1.vi
Possible reason(s):
VISA: (Hex 0xBFFF002F) You must be enabled for events of the specified type in order to receive them.
Error -1073807346 occurred at Property Node (arg 1) in VISA Configure Serial Port (Instr).vi->YN.vi->inc.vi
Possible reason(s):
VISA: (Hex 0xBFFF000E) The given session or object reference is invalid.
04-07-2011 04:41 PM
You'll need to post your code so we can see what's up
03-26-2012 03:17 AM
Hi !!!
Peeristar,
Hi every one !
So did you manage to get your motor work with only LabView and your serial port?
I am doing the same thing and ... I am suffering to get all things together!
let me know is you got any thing
thanks
amayas
03-26-2012 12:23 PM
hi amayas....
yes i could get my motor working....
my problem that time was in running the sub vis in the event structure....
if you can tell your problem more precisely.... maybe i can help....
03-27-2012 02:40 AM
Have you search the company web site and the internet for a free LabVIEW library?
03-28-2012 03:06 PM
Hi !!
thank you for your answer, in fact ... i don't even know how to wire my step motor to RS232 !
it has 4 wires ... for now, i am trying at least to see how i can get it work with normal curent ...
Do you have any idea how i can wire it to my RS232?
what add ons doi have to have on my LabView (i have the 2011 version).
please, let me knwo, what i need to get the work done
all the best and ... thank you
amayas
03-28-2012 03:08 PM
Sd.Kfz 10 thank you for the answer
Yes, i am surfing on internet looking for all whatcan help me to do this job
please, if you have any suggestions, files, documents, libreries ... let me know
thanks again
amayas
03-28-2012 11:52 PM
as far as the connection goes, i believe u can use a serial cable for connecting the motor to your computer.....
and for the programming, as mentioned in one of the comments above, you should check out the shipped examples of serial read/write.
If you have the command strings given by the company, u can just write them in the string input of the serial write code. The instrument i/o palette has the vis for serial communication.