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,168
Hi PLC people, think about this scenario: The PLC is somehow connected to the same network with the facilities` network. Then someone connects to...
Replies
2
Views
88
Hello, good morning, I have been having two problems with the Tia Portal software. The first is that I have installed it on my computer and...
Replies
5
Views
192
Hello all! So I have one project with a S7-1214 and a MTP1500 "Project1" and one project with another S7-1214 "Project2". Both of these PLC:s need...
Replies
6
Views
116
Hello, i am using profibus as communication between plc and fanuc arm. I can easily send inputs from plc to arm, but i can't monitor any outputs...
Replies
0
Views
47
Back
Top Bottom