Questions tagged [twincat]

TwinCAT is a PC-based PLC automation software package made by Beckhoff Automation.

TwinCAT is a PC-based PLC automation software package made by Beckhoff Automation.

Links

Related Tags

421 questions
0
votes
1 answer

Setpoint velocity change isn't taken over by axis

I use function from MC_Jog to do the movement. However, when I change the Jog's velocity to 900, the Setpoint velocity still shows 100. Why is Setpoint velocity displaying 100 instead of 900?
Connor
  • 1
  • 3
0
votes
1 answer

Twincat 3.0 How to convert string to ASCII code and vice-versa?

Is there any function block which allows conversion of string to ASCII code and vice versa in TwinCAT? I found this function f_ToCHR, but it only converts one character at a time and for converting the whole string, I would need to put it in a for…
Piper
  • 149
  • 11
0
votes
2 answers

Create a simple Look UP Table in TwinCAT

How can create a simple LUT(Look-Up Table) in TwinCAT3 for example I have data like this: (1,1) (2,4) (3,9) (4,16) ... I want to create a function that uses the above data to calculate new data, y=f(x) will be a function that gives the result 2.25…
asys
  • 667
  • 5
  • 20
0
votes
1 answer

TwinCAT3: Data written into .txt file has gibberish together with actual values. How do I prevent this from happening?

I am currently running a file writer function block to save data being generated from my system. The data is put into an array of strings and then using File_Write is written into a text file. However, the end result shows gibberish together with…
Stunts1897
  • 55
  • 4
0
votes
2 answers

How to save value of integer variable in TwinCat3?

I have a program in TwinCat where 5 integer variables are being updated every 10 seconds to represent the state of 5 pumps. I want to save these values that are being generated into either a textfile or CSV file that I can later extract from the…
Stunts1897
  • 55
  • 4
0
votes
2 answers

Multi independent input timer

Imagine that we have independent boolean variables that can occur independently. Now, if at least one of the variables occurs for a certain period of time, an alert will be activated. The common solution is that we use a timer for each variable. Is…
asys
  • 667
  • 5
  • 20
0
votes
1 answer

Change default implementation language of a POU in TwinCAT

When you create a new POU in a project, there is an option to select the implementation language. On one system the default implementation language is set to Structured Text (ST) and on a second system it defaults to Continuous Function Chart…
Roald
  • 2,459
  • 16
  • 43
0
votes
1 answer

How can I enable the TcRTime watchdog on a PLC?

I have some PLC code which crashes two different PLCs. On one PLC (CX2040 x64) whenever I activate the solution, the CPU cores where the project is running on, jumps to 99%. At this time it seems to be stuck in some infinite loop. When this happens,…
Roald
  • 2,459
  • 16
  • 43
0
votes
2 answers

Why can't I pass output variable as a parameter to function block constructor in IEC61131-3 structured text (TwinCAT3)?

I have a function block A that has one variable output (defined in the FUNCTION_BLOCK A method) and this FB_init method: METHOD FB_init : BOOL VAR_INPUT bInitRetains : BOOL; // if TRUE, the retain variables are initialized (warm start /…
Jakub Szlaur
  • 1,852
  • 10
  • 39
0
votes
4 answers

How to pass variable type as an argument to an function in IEC61131-3 structured text (TwinCAT3)?

This is what I would like to have (this is a constructor for FB object): METHOD FB_init : BOOL VAR_INPUT bInitRetains : BOOL; bInCopyCode : BOOL; //My variables: typeOfVariable : TYPE; // This obviously doesn't…
Jakub Szlaur
  • 1,852
  • 10
  • 39
0
votes
2 answers

Need to optimize code (Reduce the size) CODESYS ST (TwinCat 2) to save memory

The code size (CODESYS ST, TwinCat 2) for the beckhoff BC9000 PLC (64 kB max) should be reduced to a minimum: var word_CO2: word; (code skipped) Need to reduce the size of this…
0
votes
1 answer

How to link CSS element in TwinCat 3 HMI, to parameter

I used status indicator web component in my HMI HTMLhost in twincat. I created HTMLhost and added to script these lines:
0
votes
1 answer

Connect TCP socket failed with: 111 (No connection between python in linux and twincat in windows)

I have been trying to get a connection between TwinCAT 3 on Windows and Python on Ubuntu. I already have the connection between Twincat 3 Windows and Python Windows working, but not to Ubuntu. I have a virtual machine set up through Oracle VM…
0
votes
2 answers

Concatenate variable

I need to concatenate a string and an integer and a string into a variable - in this case an input. The inputs are named as following: DI_Section1_Valve AT %I*: BOOL; DI_Section2_Valve AT %I*: BOOL; DI_Section3_Valve AT %I*: BOOL; Now, I want to…
Thoft
  • 15
  • 5
0
votes
2 answers

Codesys 3. How to get the translations from static or dinamic text file in ST?

I am using Twincat 3 (4024.10) and I tried the functions "GetTextByStringId" and "GetText" from the library SysLibTargetVisu but the compiler already gives me an error: Error Unresolved reference: 'GETTEXTBYSTRINGID' 0 It seems that…