Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

Using RS232 with Parker/Compumotor Zeta 6104

Bill, here is a fairly simple one. I hope this works - my 6104 is in another building - I save versions every so often and this looked like a relatively straightforward one. At least, without the 6104 attached, it runs.
 
Getting the 6104 talking did not seem very difficult. I did have to !K the previous user's program that my 6104 was trying to start. You will want to get the 6000 Series Programmer's Guide and the 6000 Series Software Reference (which the Programmer's Guide refers to as the "Command Reference"), I think hardcopies with your product or certainly as .pdf's on Parker's web site.
 
Notice I have a loop that keeps trying to find new text in a local variable, and if it appears there, the loop removes the text from the local variable and writes it out the serial port. Semaphores keep this loop from removing and "blanking" the text simultaneously with another part of the code writing the text into the local variable. This loop that keeps trying to send text is also looking at the receive buffer of the port, and whenever a nonzero length appears there, it reads that many characters and appends them to a text indicator on the front panel. I'm not very experienced in LabView and don't really know whether this is a smart way of achieving my goal, or if this will become the Funniest Post of 2008 and cause others to laugh and jeer.
 
If this works and helps you out, great. If it is too complicated and/or doesn't work, tell me, and I'll try to make something smaller and cleaner if you want.
Message 11 of 26
(4,959 Views)

Thanks for your help.  I'm pretty new at Labview also.

 

Good Luck,

 

Bill

0 Kudos
Message 12 of 26
(4,945 Views)

Bill, here is a fairly simple one. I hope this works - my 6104 is in another building - I save versions every so often and this looked like a relatively straightforward one. At least, without the 6104 attached, it runs.
 
Getting the 6104 talking did not seem very difficult. I did have to !K the previous user's program that my 6104 was trying to start. You will want to get the 6000 Series Programmer's Guide and the 6000 Series Software Reference (which the Programmer's Guide refers to as the "Command Reference"), I think hardcopies with your product or certainly as .pdf's on Parker's web site.
 
Notice I have a loop that keeps trying to find new text in a local variable, and if it appears there, the loop removes the text from the local variable and writes it out the serial port. Semaphores keep this loop from removing and "blanking" the text simultaneously with another part of the code writing the text into the local variable. This loop that keeps trying to send text is also looking at the receive buffer of the port, and whenever a nonzero length appears there, it reads that many characters and appends them to a text indicator on the front panel. I'm not very experienced in LabView and don't really know whether this is a smart way of achieving my goal, or if this will become the Funniest Post of 2008 and cause others to laugh and jeer.
 
If this works and helps you out, great. If it is too complicated and/or doesn't work, tell me, and I'll try to make something smaller and cleaner if you want.

 

Hi cebailey,

Let me begin by saying I am a very inexperienced labview user and have never
programmed in the 6000 language...

That said, I am trying to control the 6104 in order to move an actuating arm
up and down in the y axis.  The 6104 is connected to my laptop via a DB 9 to
a DB 9 to USB adapter.

I found your example vi and am trying to run it, to no avail.  I tried entering D,
 V, and A values, have pressed the various buttons in all sorts of iterations.  I
tried typing in 6000 commands out of the programmers manual but that didn't help
either.

Could you possibly point me in the right direction as to how to proceed?

Thanks very much for any help you can provide, it will be much appreciated 🙂

Message Edited by sabaq on 06-12-2009 12:31 PM
0 Kudos
Message 13 of 26
(4,079 Views)

Sabaq, the one I posted now looks funny and outdated. It could take quite a while to try to figure out what it is doing wrong by going back and forth with you. I maybe could post a more recent version, which is in 5 vi's and needs a testing wrapper around it to pass references to controls in. But it is more complicated, and more dedicated to the specific things I am doing. I don't know if it is worth your while. I am, though, controlling a two axis system with LV now, and have to be able to set speeds and destinations, move to relative or absolute locations, predict times required to move some distance with the acceleration and deceleration accounted for, read the motor position, check various flags like the P-CUT input and the limit switches, pass unusual reply strings back to the main program, and so forth. It certainly works.

 

But, the important thing is to understand what you want LV to do with the control. You want enough of a grasp of the 6000 language so you can send the right strings and interpret the replies you need.

 

I suggest you set LV aside for the moment and just use a terminal program (I like Realterm) to send strings to the 6104 and read the strings that come back. You send a command and use a CR and or LF at the end, and the 6104 acts on it. Put comments on the ends of your lines with a semicolon between the command and the comment, and you can verify it is handling your messages. Everything comes back in uppercase whether it was uppercase or lowercase when you wrote it. Start by trying to get it to hear you and echo what you send. Then ask it to report its position (TPM, "transfer position of motor") or its status (TSS I think, "transfer system status"). Then try making it move. Once it starts doing things for you, figuring out why it won't do some other thing is an easier, incremental process. If you try and then post a specific question here I may be able to answer it.

0 Kudos
Message 14 of 26
(4,074 Views)

Thanks for your reply cebailey.  I will try to grasp the basics of 6000 first, and then try what you suggested.

 

 

0 Kudos
Message 15 of 26
(4,072 Views)

Another terminal program you may want to try is Motion Archetect from Parker/Compumotor. Their 6 K Series Programming guide will get you off to a good start.

 

Bill

0 Kudos
Message 16 of 26
(4,066 Views)
Thanks Bill, I actually just downloaded that and am going through the example program.
0 Kudos
Message 17 of 26
(4,064 Views)

 

But, the important thing is to understand what you want LV to do with the control. You want enough of a grasp of the 6000 language so you can send the right strings and interpret the replies you need.

 


Hi cebailey,

 

Using your originally posted vi, labview sees and communicates with the 6104.  My question now is, how do I communicate specific commands to the 6104 through the vi?  I have the 6104 software reference and programmer's guide, so I know what kind of commands to send.  Are you just typing in commands one at a time into the text field in the center?

 

Saba  

0 Kudos
Message 18 of 26
(4,052 Views)

Saba, the way I was using this vi was by clicking the buttons (for example clicking DRIVE1 powers the motor like the same command does in 6000 language), or by entering a number and clicking the button next to it (for example clicking V# with an 8.3 in the box next to it does the same thing as sending a "V8.3" string), or by typing text into the box you asked about. I think you should see the resulting text that goes to the 6104 echoed to the Text Received box - do you? Do you get anything? If you type a lowercase comment like ;test in the box, do you see TEST appear in the Text Received box?

 

I think I fat-thumbed something when I left the Arbitrary Text box pane gray instead of white, which controls usually are.

0 Kudos
Message 19 of 26
(4,042 Views)

cebailey,

 

It's alive, there is movement!  i think i get it now...thanks for your patients, I really appreciate it 🙂

0 Kudos
Message 20 of 26
(4,039 Views)