Motion Control and Motor Drives

cancel
Showing results for 
Search instead for 
Did you mean: 

How to communicate with Compax3 via RS232

Solved!
Go to solution

I had similar issues as the other posters until I figured out that the address bits 8-12 in the command word (1100.3) is the SET number of the motion profile you configured in the Parker software. So making a Compax3 work via RS232 is a two step process.

 

1. Configure the motion profile(s) in the Parker software and note the SET# (see attached PNG file for an example)

2. In your labview code use this SET# to format your commands (ex. o1902.5 is the velocity for SET#5, o1902.4 is the velocity for SET#4, etc)

 

Remember that starts occur on the edge of bit 13, so you'll need to toggle that bit to get the profile to start. Then send the start with the SET# in the address. For example using SET#5 I would send o1100.3=$6503 or if using SET#4 that value would be $6403.

 

To update the drive without stopping it requires you use another motion profile and switch to that profile (changing .5 to .4 in my example) and toggling between the motion profiles each time you update (ex. starting a velocity move and updating it 2 times would  be starting on SET#4, update SET#5 and start it, update SET#4 and start it)

 

The documentation doesn't make this relationship clear and makes this process far harder than it should.

 

Hope this helps.

Message 61 of 88
(2,368 Views)

I have a question. It might sound a little silly but I'm kinda new in all of this. I have a compax3 drive that I would like to control with labview. I already reconfigured the drive to I11 T11 and moved it with the sofware ware that Parker provided so the drive works just fine. Now my question is, if I would like to write these command that TWGomez suggested in one of his early post which looks like this:

 

"O 1100.3=1" (To activate the drive axis)

"O 1902.2=X" (X= velocity)

"O 1901.2=X" (X= Position)

"O 1100.3=$6203" (Sets the appropriate bits to move the axis)

All commands are to be followed by CR

 

Do I separate all the commands with a coma and write the all thing to the buffer? So the command to be sent or written to buffer will be

 

O 1100.3=1 CR,O 1902.2=X CR,O 1901.2=X CR, O 1100.3=$6203 CR 

 

Is it how it works or do it need to send the commands in sequence like this:

 

O 1100.3=1 CR -------write to buffer

then

O 1902.2=X CR -------write to buffer

then

O 1901.2=X CR --------write to buffer

and finally

O 1100.3=$6203 CR -------write to buffer

 

 

cheers!

 

0 Kudos
Message 62 of 88
(2,326 Views)

The second way.  Each command is to be independent.

0 Kudos
Message 63 of 88
(2,313 Views)

I used an if statement that waited for the response between commands.  If you don't, then it can send them too fast and will skip some.  

0 Kudos
Message 64 of 88
(2,310 Views)

Anybody gotten the motor to run a speed curve?

 

Let's say you have a curve that's fairly smooth.

 

I'm thinking you'd break this curve into segments at each inflection point and peak and then try to describe each of the segments using Speed, Acceleration and Jerk.

 

(The speed you put down would be equal to the next inflection or peak point.)

 

Plug each of these parameters into a row in the motion profile table and then call each row as you get to speed.

 

 

What do you guys think? Or is there a better option I'm missing?

 

Thanks,

David Li

0 Kudos
Message 65 of 88
(2,301 Views)

I got it to change speed "on the fly" by changing the speed in the table - just using the one line in the table rather than filling in multiple lines. This allowed me to change speed as an when I needed to in real time. You could use this to change the speed with time to an equation. I was monitoring pressure and using this signal to decide when to change speed.

 

HTH. I can look up the code segment if that would be helpful.

 

 

0 Kudos
Message 66 of 88
(2,298 Views)

Sweet, I'll look into that. I remember the program I wrote had a few extra lines everytime I wanted to change speeds, like acknowledgements and whatnot. It always brought the speed down to zero before going to the next speed..

 

What command did you use to change speed on the fly?

 

Thanks,

David Li

0 Kudos
Message 67 of 88
(2,293 Views)

Front Panel.PNG

 

Block diagram 1.PNG

 

Block diagram 2.PNG

 

 

Hello,

Per you guys posts, here is what I came up with to communicate with the compax3. The block diagram is one long sequence although I'm showing two different pics here. My PC screen was not big enough to capture the whole diagram. Anyway, I followed to the letter TWGomez commands but nothing happens. I'm trying to keep this as simple as possible so here are the command that I'm using:

 

O 1100.3=1 CR -------write to buffer

then

O 1902.2=X CR -------write to buffer

then

O 1901.2=X CR --------write to buffer

and finally

O 1100.3=$6203 CR -------write to buffer

 

I tried reading the buffer and its blank! So I must be doing something wrong here. I'm guessing that's how the code show look like correct?

Cheers!

 

 

0 Kudos
Message 68 of 88
(2,277 Views)

By the way I get no errors with this labview here is the labview code by the way. I saved it as labview 8.5 in case people have older version.

0 Kudos
Message 69 of 88
(2,277 Views)

Try inserting a command to set to MoveRel mode before your Set Bit code. 

And also command the entry into the set table.

Labview Set Bit.JPG

Command to set to MoveRel mode in Motion Table Row 2:

O1905.2=2

 

Then command entry to set table (Pg. 296 in the C3I1T11 manual):

O1904.2=$32

 

If that doesn't work, are you in FREE Assignment mode? I had a bunch of trouble trying to get my code running but it turned out I didn't have FREE assignment mode initially enabled in the Parker Integrated Engineering Tool.

0 Kudos
Message 70 of 88
(2,260 Views)