From TIA to Twincat

Varri

Member
Join Date
Jan 2020
Location
South
Posts
30
Hi!

Im looking at converting a machine program from Siemens TIA to Beckhoff Twincat. Most of it is SCL so its not a problem to convert the code.

On the Siemens part the program consists of FB`s and UDT`s for most things. Its a bit of work to convert this to codesys as i have to create a DUT for a stuct inside a DUT.

How can i most effectivly assign "start values" for a variable in a DUT, in the GVL?
Say i create a motor of type "motor", and i want the fallback to be these values:

Motor: motor := (spSpeed := 99,
speedLimitLow := 15,
speedLimitHigh := 85,
currentLimit := 25);

Next time im working on the machine, setpoints, limit values and scalings have changed from the HMI. Im TIA portal i could set the online values as start values, how can i do this in the Twincat?
 
Next time im working on the machine, setpoints, limit values and scalings have changed from the HMI. Im TIA portal i could set the online values as start values, how can i do this in the Twincat?
So what you are asking for is not how to declare start values, but how to take a snapshot of the actual values and import these into the PLC program as start values.

(I dont know Twincat, just wanted to clarify the question)
 
You can create a DUT of type STRUCT and set all initial startup values there.
Code:
TYPE MotorStruct :
STRUCT
    spSpeed              :DINT:=99;
    speedLimitLow        :DINT:=15;
    speedLimitHigh       :DINT:=85;
    currentLimit         :DINT:=25;
END_STRUCT
END_TYPE


Is that what you're looking to do?
 
Im TIA portal i could set the online values as start values, how can i do this in the Twincat?
Is there a way to copy the online actual values to the offline start values ?
I think he is referring to the TIA functions 'snapshot' and subsequental 'copy snapshot to start values'.
 
So what you are asking for is not how to declare start values, but how to take a snapshot of the actual values and import these into the PLC program as start values.

(I dont know Twincat, just wanted to clarify the question)

Perhaps with a recipe
 

Similar Topics

For an automation project we need to program for the first time in TwinCAT (V2). The Twincat software and PLC control is new to me. Programming in...
Replies
7
Views
5,111
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
2
Views
185
Hi, I have had problem with upgrading some projects from v16 to v18. I tried it on 3 diffrent computers. I want to post this so that anyone that...
Replies
3
Views
148
Hello gentlemen, Im working on a small project on TIA Portal, about establishing a Modbus TCP connection between my ET200SP plc and a socomec...
Replies
12
Views
286
I am currently am in a PLC class and need urgent help on how the ladder logic would be laid out. I understand how to get the traffic lights to...
Replies
19
Views
434
Back
Top Bottom