Mark,
I see from the definition file you have the limits disabled on your axes.
The driver will set the problem bit and not let you drive the motors in this case.
You can override this behaviour by placing the following in the startup script:-
pmacDisableLimitsCheck("Brick", 1, 0)
pmacDisableLimitsCheck("Brick", 2, 0)
pmacDisableLimitsCheck("Brick", 3, 0)
...
Where "Brick" is the port name you passed in the first param to powerPmacCreateController .
regards,
giles
________________________________
From: [email protected] <[email protected]> on behalf of Mark Davis <[email protected]>
Sent: 06 July 2018 19:44:37
To: Mark Rivers; [email protected]
Subject: Re: Delta Tau Power Brick LV-IMS driver
Having had very little experience with EPICS and motor controllers, and none with the Delta Tau controllers, I can only go on what others have told me so far, but I am guessing this newer Power Brick controller is significantly different than the Geo Brick controllers (and possibly earlier Power Brick ones)?
For starters, I was told that the older controllers do not run Linux (as this model does).
And based on the files you included, I am guessing that the programming is significantly different (see the files in the attached project I was given to load on the Power Brick).
Mark
One example: A piece of the global definitions.pmh file:
// Axes 1-8 to Orientalmotor PKP268MD28BA no encoder no brake
// Axes 9-16 reading quadrature encoders
// 102400 cts/rev ?
Sys.pAbortAll = 0
GLOBAL MaxAdc = 33.85; // Max ADC reading [A peak]
GLOBAL MtrRmsPeakCur = 3; // RMS Peak Current [A rms]
GLOBAL MtrRmsContCur = 2.8; // RMS Continuous Current [A rms]
GLOBAL MtrTimeAtPeak = 1; // Time Allowed at peak [sec]
GLOBAL MtrMaxRpm = 1500; // Motor Maximum Speed [RPM]
GLOBAL MtrStepAngle = 0.9; // Motor Step Angle [degrees]
GLOBAL MtrIiGain = 0.081;
GLOBAL MtrIpbGain = 1.9462;
GLOBAL MtrJogSpeed = 300;
GLOBAL MtrJogTa = -1;
PTR Output1->PowerBrick[0].GpioData[0].16.1; // Output #1,X15 Pin#12 Pin#30
PTR Output2->PowerBrick[0].GpioData[0].17.1; // Output #2,X15 Pin#13 Pin#31
PTR Output3->PowerBrick[0].GpioData[0].18.1; // Output #3,X15 Pin#14 Pin#32
PTR Output4->PowerBrick[0].GpioData[0].19.1; // Output #4,X15 Pin#15 Pin#33
PTR Output5->PowerBrick[0].GpioData[0].20.1; // Output #5,X15 Pin#16 Pin#34
PTR Output6->PowerBrick[0].GpioData[0].21.1; // Output #6,X15 Pin#17 Pin#35
PTR Output7->PowerBrick[0].GpioData[0].22.1; // Output #7,X15 Pin#18 Pin#36
PTR Output8->PowerBrick[0].GpioData[0].23.1; // Output #8,X15 Pin#19 Pin#37
PTR ADC1X9 ->S.IO:$900028.16.16; // ADC1 X9 [Counts]
PTR ADC2X9 ->S.IO:$9000A8.16.16; // ADC2 X9 [Counts]
PTR ADC1X10->S.IO:$900128.16.16; // ADC1 X10 [Counts]
PTR ADC2X10->S.IO:$9001A8.16.16; // ADC2 X10 [Counts]
PTR ADC1X11->S.IO:$904028.16.16; // ADC1 X11 [Counts]
PTR ADC2X11->S.IO:$9040A8.16.16; // ADC2 X11 [Counts]
PTR ADC1X12->S.IO:$904128.16.16; // ADC1 X12 [Counts]
PTR ADC2X12->S.IO:$9041A8.16.16; // ADC2 X12 [Counts]
PTR DAC1X9-> S.IO:$90004C.16.16; // DAC Channel 1, X9 [Counts]
PTR DAC2X9-> S.IO:$9000CC.16.16; // DAC Channel 2, X9 [Counts]
PTR DAC1X10->S.IO:$90014C.16.16; // DAC Channel 1, X10 [Counts]
PTR DAC2X10->S.IO:$9001CC.16.16; // DAC Channel 2, X10 [Counts]
PTR DAC1X11->S.IO:$90404C.16.16; // DAC Channel 1, X11 [Counts]
PTR DAC2X11->S.IO:$9040CC.16.16; // DAC Channel 2, X11 [Counts]
PTR DAC1X12->S.IO:$90414C.16.16; // DAC Channel 1, X12 [Counts]
PTR DAC2X12->S.IO:$9041CC.16.16; // DAC Channel 2, X12 [Counts]
Sys.WpKey = $AAAAAAAA
Gate3[0].Chan[0].PackIndata = 0
Gate3[0].Chan[1].PackIndata = 0
Gate3[0].Chan[2].PackIndata = 0
Gate3[0].Chan[3].PackIndata = 0
Gate3[1].Chan[0].PackIndata = 0
Gate3[1].Chan[1].PackIndata = 0
Gate3[1].Chan[2].PackIndata = 0
Gate3[1].Chan[3].PackIndata = 0
Gate3[0].Chan[0].PackOutdata = 0
Gate3[0].Chan[1].PackOutdata = 0
Gate3[0].Chan[2].PackOutdata = 0
Gate3[0].Chan[3].PackOutdata = 0
Gate3[1].Chan[0].PackOutdata = 0
Gate3[1].Chan[1].PackOutdata = 0
Gate3[1].Chan[2].PackOutdata = 0
Gate3[1].Chan[3].PackOutdata = 0
Sys.WpKey = 0
BrickLV.Chan[0].TwoPhaseMode=1
BrickLV.Chan[1].TwoPhaseMode=1
BrickLV.Chan[2].TwoPhaseMode=1
BrickLV.Chan[3].TwoPhaseMode=1
BrickLV.Chan[4].TwoPhaseMode=1
BrickLV.Chan[5].TwoPhaseMode=1
BrickLV.Chan[6].TwoPhaseMode=1
BrickLV.Chan[7].TwoPhaseMode=1
// Setup Encoder for Direct Microstepping
EncTable[1].type = 11
EncTable[1].pEnc = Motor[1].PhasePos.a
EncTable[1].index1 = 5
EncTable[1].index2 = 0
EncTable[1].index3 = 0
EncTable[1].index4 = 0
EncTable[1].index5 = 255
EncTable[1].index6 = 1
EncTable[1].ScaleFactor = 1 / (256 * (EncTable[1].index5 + 1) * EXP2(EncTable[1].index1))
// Motor[1].pLimits = PowerBrick[0].Chan[0].Status.a // Limits Enabled
Motor[1].pLimits = 0 // Limits disabled
Motor[1].pEnc = EncTable[1].a
Motor[1].pEnc2 = EncTable[1].a
Motor[1].ServoCtrl = 1
Motor[1].AdcMask = $FFFC0000
Motor[1].AmpFaultLevel = 1
Motor[1].PhaseOffset = 512
Motor[1].PhaseCtrl = 6
Motor[1].PhaseMode = 1
Motor[1].PhasePosSf = 0
Motor[1].pAbsPhasePos = PowerBrick[0].Chan[0].PhaseCapt.a
Motor[1].PowerOnMode = 2
Motor[1].Servo.MaxPosErr = 100000
Motor[1].SlipGain = Sys.PhaseOverServoPeriod / (Motor[1].Stime + 1)
Motor[1].AdvGain = 1/16*Sys.PhaseOverServoPeriod*(0.25/Sys.ServoPeriod/Sys.PhaseOverServoPeriod)
Motor[1].Servo.Kp = 1
Motor[1].Servo.Kvff = 1
Motor[1].Servo.Kaff = 1
Motor[1].Servo.Kvfb = 0
Motor[1].Servo.Ki = 0
Motor[1].Servo.Kvifb = 0
Motor[1].Servo.Kviff = 0
Motor[1].PwmSf = 0.95 * 16384
Motor[1].MaxDac = MtrRmsPeakCur * 40132.44 / MaxAdc
Motor[1].I2TSet = MtrRmsContCur * 40132.44 / MaxAdc
Motor[1].I2tTrip = (POW(Motor[1].MaxDac,2) - POW(Motor[1].I2TSet,2)) * MtrTimeAtPeak
Motor[1].IdCmd = Motor[1].I2TSet / 5 // Holding current
Motor[1].MaxDac = MtrMaxRpm / 60000 * (360 / (4 * MtrStepAngle)) * 2048 * Sys.ServoPeriod
// Current Loop PID Gains
Motor[1].IiGain = MtrIiGain
Motor[1].IpbGain = MtrIpbGain
Motor[1].JogSpeed = MtrJogSpeed
Motor[1].JogTa = MtrJogTa
< repeat for the next 7 axes>
// Quadrature encoders
Motor[9].ServoCtrl = 1
EncTable[9].type = 1
EncTable[9].pEnc = PowerBrick[0].Chan[0].ServoCapt.a
EncTable[9].pEnc1 = Sys.Pushm
EncTable[9].index1 = 0
EncTable[9].index2 = 0
EncTable[9].index3 = 0
EncTable[9].index4 = 0
EncTable[9].index5 = 0
EncTable[9].ScaleFactor = 1 / 256
<repeat for the next 7 virtual axes>
Mark Davis NSCL/FRIB Control Systems Software Engineer [email protected]<mailto:[email protected]>
On 7/6/2018 11:28 AM, Mark Rivers wrote:
Hi Mark,
I suspect the problem bit could be because you got a following error. Strange as it seems, the Delta Tau requires that the PID parameters be correctly tuned, even when running open-loop stepper motors. It is actually doing feedback on the theoretical position of the motor (output pulse count). The Delta Taus were really not designed for stepper motors, and it is a bit of hack to get them to work. For example, they have no primitive commands to reduce the current to a holding current value when a stepper motor is done moving. You need to write a PLC program to do this.
Most sites use a standard configuration file to configure axes for open-loop stepper, closed-loop stepper, closed-loop servo, etc. The easiest thing to do is to get one of these files and download it to the controller.
I have attached some files we have used for configuring the GeoBrick.
Mark
-----Original Message-----
From: [email protected]<mailto:[email protected]> <[email protected]><mailto:[email protected]> On Behalf Of Mark Davis
Sent: Friday, July 6, 2018 10:13 AM
To: [email protected]<mailto:[email protected]>
Subject: Delta Tau Power Brick LV-IMS driver
Working with some new equipment here and having some problems getting things working correctly and hoping someone can give me some tips on what to look for.
We have a couple of new Delta Tau Power Brick LV-IMS controllers that I need to get working ASAP.
Here is where I am at the moment:
- I have an EPICS 3.14.12.2 IOC running the following:
- The powerPMAC driver from
https://urldefense.proofpoint.com/v2/url?u=http-3A__www.observatorysciences.co.uk_deltatau-5Fdownloads.php&d=DwIGaQ&c=nE__W8dFE-shTxStwXtp0A&r=D7ZiziuMQuq40HlGYOZPBg&m=impc3PMAsZz_XZAmpSNMmujkWm6nhRAOBrr236QxM1A&s=wkk7WCcsFhUz_1v7bXSFabxWPo7jDSYEcvJTwv1uRQQ&e=,
- The ssh2 library as described in the manual for the driver
- Version 6-9 of the motor module
- Version 4-23 of the asyn module
- The records included in the example/test IOC config included with the driver (which includes a motor record)
- The latest PowerMAC IDE application from Delta Tau running on a Windows 7 computer
- A FESTO stepper motor (Model EMMS-ST-57-S-SEB-G2), which includes a brake and an encoder
- The appropriate power supply from Delta Tau to provide the power for the controller and (through it) the motor
- A very basic configuration/program running on the Delta Tau (one which I was told is basically a copy of one of the examples provided by Delta Tau) which includes definitions for 8 open-loop axes (where the reported position is based on the # of steps) and 8 read-only virtual axes that report the position based on the encoder counts.
Both the IOC and the IDE application can connect to the Delta Tau, and I can open a command-line shell to it via SSH (the controller runs some version of Linux)
If the IOC is not running, when I use the IDE application to jog the motor it will move until it reaches the the specified position.
When the IOC is running, if I change the setpoint for the motor record, the motor moves a bit in the correct direction but quickly stops. This is presumably because the PROBLEM bit in the motor record's MSTA field is always set so the motor record is in the major STATE alarm state, causing the record logic to stop the motor movement.
The brief description of the PROBLEM bit simply says "driver stopped polling, or hardware problem". But fields in the motor record are frequently updating, showing any changes in the position of the motor, so I wouldn't think it would be a polling problem. And the fact that everything appears to work fine when using the IDE application would seem to imply that there are no hardware problems.
I will be digging through the code trying to trace this back to some identifiable cause, but if anyone has any experience with this controller and has some tips on what I might check or should be looking for, that would be much appreciated.
Mark Davis
NSCL/FRIB
- The ssh2 library
I have this driver installed on a Linux box running EPICS 3.14.12.2 and (as explained in the doco for this driver) installed the libssh2 library it needs to open an SSH connection to the controller.
I know almost nothing about the controller itself, but was provided with a very basic "project" with some code that I was told is mostly a copy of some example from Delta Tau.
I have