OpenPCS in EPOS Studio "E: S3004: Multiple assignment of a variable/name" errors

mkbloke

Member
Join Date
Jul 2016
Location
Milton Keynes
Posts
2
OpenPCS in EPOS Studio "E: S3004: Multiple assignment of a variable/name" errors

Hi,

I'm doing some work on a Maxon Motors EPOS P 24/5 linked to an EPOS 24/5 via CAN bus.

I'm using EPOS Studio 3.0 rev. 1 and with that comes OpenPCS version 6.4.3.

Originally the code read a limit switch to stop two motors travelling in one direction, reverse the motors' direction and then read a limit switch to stop both motors travelling in the reverse direction.

I have modified it now so that each motor is stopped by its own limit switch in the reverse direction. The forward direction single limit switch still applies to both motors and causes them both to reverse however.

Since adding another branch I've been getting the "E: S3004: Multiple assignment of a variable/name" errors from the compiler.

Here is the code from the step that has the issue (this is in a branch after the reverse limit switch for motor 2 has been hit and detected):

Code:
oTransReadOutSw2 := FALSE;
oRead2 := FALSE;
oMoveVel2 := FALSE;

fReadDigital2(Axis := Motor1, Enable := oRead2, Purpose := M2OutLimitSw);

fMoveVel2(Axis := Motor2, Execute := oMoveVel2, Acceleration := Accel, Deceleration := Decel, Velocity := Vel, Direction := DirOut);

IF NOT fMoveVel2.InVelocity AND NOT fMoveVel2.Error THEN
    oTransTravelOutStop2 := TRUE;
END_IF;
By commenting out various bits I have found the problem area to be:

Code:
IF NOT fMoveVel2.InVelocity AND NOT fMoveVel2.Error THEN
    oTransTravelOutStop2 := TRUE;
END_IF;
The problem seems to be that the error is generated for each of the fMoveVel2 lines in the IF statement (I can set oTransTravelOutStop2 separately without any errors).

I have the same code in another parallel branch which doesn't seem to have any compilation issues that is the same, except that everything is f*1, oTrans*1, etc. Note that the limit switch read in fReadDigital2 in the code fragment above is on Motor axis 1, however.

I'm a beginner to this and am trying to get some code together for a unit that is used in university research. The unit originally had code on the PLC, but after the unit was lent to researchers at another institution it came back without code on the PLC and nobody seems to have the original code!

Any help or ideas on resolving this would be much appreciated. I have searched on Google quite a bit, but there is very little in the way of open support for OpenPCS it would seem.

Thanks.

--
Cheers, Ian
 
The problem is a length limit on the step names, it would appear.

If the step name isn't unique within 15 characters, you get these
errors.
 

Similar Topics

Hi, Has anyone worked with Infoteam's OpenPCS? I need help in working with the Ladder Logic of it, or IL or SFCs of it. I tried searching the...
Replies
4
Views
3,312
Hello everyone i am trying to found project for s7 plc "TEST_ZE_EPOS" Is siemens project for plc-senamics fuction with "epos" has anyone idea...
Replies
0
Views
1,217
I have to commision a servosystem with S120 Epos function. It concerns a continuous rotating chain that has pusher connected to it. The position...
Replies
0
Views
4,009
Hi guys , I'm new with Allen Bradley, but I have experience with Tia portal (s7 1200 ,s7 1500) I want to convert my project from Tia portal to...
Replies
1
Views
94
Hi everyone, I have an issue with installation of Studio 5000 33.00.02 DVD Media disc 2 with View Designer on Windows 11. After installation...
Replies
0
Views
70
Back
Top Bottom