PLC1484. Write a simple program to test a motor

Hello everyone

I am new to researching B&R products.

My hardware setup includes: PLC X20CP1484, Acopos 1180, Motor 8LSA66.r0030d104-1, and AS4.2 software.

Today, I have two questions:

  1. Question 1: I followed the instructions on YouTube to test the motor. They showed that by going to Test - Switch on - Basic movement - Positive, the motor could run. However, when I pressed Switch on, my motor vibrated strongly and then showed a Lag Current error. After some research, I pressed ‘phasing’ and ‘tuning’ and was able to test the motor.
    My question is: Why does the B&R motor, with all the parameters provided, still require ‘tuning’? And why isn’t it as straightforward as shown in the online guide?
  2. Question 2: After resolving the first issue, can I write a simple program to test the motor without using AS4.2 software? For example, turning on a switch to run the motor at a fixed speed.

Thank you, experts. :slightly_smiling_face:

Hello Felix,

here are the answers to your questions.

  1. Tuning the controllers
    There are 3 cascaded controllers at work: current, speed and position (from inner to outer).
    The current controller parameters are automatically set according to the motor parameters.
    The speed and position controllers require tuning, their parameters depend on the load the motor drives.

  2. Programm examples
    AS comes with examples for motion control. They can be found here:
    \BrAutomation\AS\Samples\Motion
    and imported into your project.
    Motion samples are provided in 3 programming languages: C, LD (ladder diagram) and ST (structured text).
    The samples are decribed in the Help: Motion samples

1 Like

Hi Martin.

Thank you, but it seems that there isn’t any program file in there. I can add the Coffee Machine file, but the file you mentioned cannot be added.

Strange.
You can unzip the file and add the content as “Existing package”.

Hi,

if I remember correctly (I don’t have 4.2 installed anymore), there is actually “Motion Samples” to choose in the Toolbar, which takes the zip directly. No need to extract the zip first. The screenshot by @felixqiu looks like he tried to open the zip via AS → Open project

In reality I guess it should be similar to this (taken from AS 4.11):

1 Like

Thank you all, I found it.