Questions tagged [structured-text]

Structured text is one of the five languages supported by the IEC 61131-3 standard, designed for programmable logic controllers (PLCs).

From Wikipedia: Structured text is one of the five languages supported by the IEC 61131-3 standard, designed for programmable logic controllers (PLCs). It is a high level language that is block structured and syntactically resembles Pascal, on which it is based. All of the languages share IEC61131 Common Elements.

126 questions
0
votes
1 answer

Frequency calculation in Beckhoff TwinCAT3.1

I am trying to determine the frequency of a pulsing input, which is tacho feedback of a pump. I have tried to create two timers which are a second each, and counts up every time there is rising edge. Based on the number of rising edges in a second,…
Vinny
  • 48
  • 8
-1
votes
1 answer

Logic to control a multi-head weigher like machine

I need help to create an algorithm to control a machine which will do something very similar of what a multi-head weigher does. I will have a array of 192 available "heads" to make combinations. I don't need to find all availabe combinations. The…
-1
votes
1 answer

How to add payload and use the post method to get response from an API in twincat 3?

enter image description hereNot getting appropriate response like I get on the postman application I tried a few online APIs which give me response, but I need an option to be able to add a payload in my program. I am using tc3 iotbase library from…
-1
votes
1 answer

SPS/ TwinCat/ Syntax Error-Code/ Declaration of TON and TOF

I am currently programming in ST (TwinCat), but two errors occured, which I do not understand at all. Error-Code says: (1) (TRUE AND TON_01.Q) is no valid assignment target (2) Q is no input of TOF I already declared Q as my Output , but TON and…
-1
votes
4 answers

I'm looking for a more concise way to compare a variable to a range of numbers in Structure Text (ST)

I am trying to find a more concise way to compare a variable to a range of numbers. Currently I do: IF int_variable=67 or int_variable=68 or int_variable=69 then... Is there a way to write something like: IF int_variable=67 through 69 then Thanks in…
-3
votes
2 answers

How to stop a incrementally moving rectangle at a point not divides Le with the increment?

I have a situation where I have a rectangle that moves in 25 px increments. I need to stop the rectangle when it’s x position is equal to 740. 740 is not dividable by 25 so the x pos will never fall on 740. This increment of 25 is also dynamic and…
1 2 3
8
9