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

Generation of triples from text for KG

I am trying to process documented text and extract triples data from the text to build a graph. I have used the stanford nlp module for generating triples, it gives good results. I want to generate domain specific triples and process the text data.…
Aravind
  • 1
  • 3
0
votes
1 answer

Initialize a Function Block using __NEW that has explicitly defined the FB_init method

Suppose I have a function block (A) that has defined the FB_init method, for example: {attribute 'enable_dynamic_creation'} FUNCTION_BLOCK A METHOD FB_init : BOOL VAR_INPUT bInitRetains : BOOL; bInCopyCode : BOOL; parameter:…
0
votes
3 answers

TwinCAT : Getting a file (FB_FileGets)

I am developing a code to get a text file in twincat. I am using the block functions: FB_FileOpen FB_FileGets FB_FileClose I build on the example on the website…
hachete14
  • 3
  • 1
0
votes
0 answers

Why am I getting an accumulator extension warning after all of my math?

I am writing a program that checks the temperature of the materials required to mix concrete. It then will execute a formula to determine what the water temperature needs to be to reach the desired concrete temperature. I have all of the correct…
Jackson148
  • 115
  • 1
  • 2
  • 9
0
votes
1 answer

How to log LREAL values to file?

I'm new to PLC programming and I'm trying to keep track of an LREAL variable in some existing structured-text code. I'm using Omron's CX-Programmer with a simulated CJ2M. My first instinct was to log all changes in value to SD card, using…
Andrew Paul
  • 162
  • 9
0
votes
3 answers

Is it possible to indirectly index an array in structured text (IEC 61131-3 standard)

I have an array of a structure: myStructure[0..100] I would like to index that structure by name. It works by giving each index a name: P101_AI := 9 P102_AI := 10 P103_AI := 11 P104_AI := 12 So indexing a member in the structure:…
tomatoeshift
  • 465
  • 7
  • 23
0
votes
2 answers

Delay Timer in Structured Text

I have Just started working on PLC using Structured text, I have to store values in Array of Temperature variable after delay of 1 min every time but i am not able to do that. FOR i := 0 TO 5 DO Temp[i] := tempsensor; END_FOR; This is kind a…
Mazdak Khan
  • 1
  • 1
  • 2
0
votes
3 answers

How to init bool array with TRUE in ST (Twincat2)?

How to init a boolean array in Structured Text (Twincat 2) with TRUE? For example like this: VAR a_referenz_array : ARRAY[0..2] OF BOOL := TRUE, FALSE ; (* This does not work !! *) END_VAR
Richard Teubner
  • 303
  • 2
  • 11
0
votes
1 answer

How to create a timing to to controller states in motors?

The timing can be used to create a delay in triggering or switching off the same motor or to create a delay in switching on or off between different motors. This is a feature used to protect the motors, avoiding drives with very short intervals. In…
Apach3
  • 3
  • 2
0
votes
5 answers

MQTT using TC3_IoT_Communication; no connection with MQTT broker but there is no error

I had a mqtt broker running on my computer and I could connect to it with twincat. I moved the mqtt broker to a server on the same network. I can connect with it by using Node-RED (so the hostname, hostport, username, and password must be correct),…
Louise
  • 3
  • 2
0
votes
2 answers

How to fix a bug on my queue of devices in PLC

I am trying to create a simple queue in .st with 6 devices that should be turned on and off in the queue order only the ones that are available should be connected. For example I did a test with 6 devices available and then I was unavailable one by…
Apach3
  • 3
  • 2
0
votes
2 answers

How to handle a lot of MQTT subscription topics in TwinCAT using Tc3_IoTBase

I'm able to read multiple subscription topics by using this code. However I'm subscribed to a lot of different topics and the long if statement is slowing down my code. I already had to up the amount of cycle ticks to 20 (this is probably overkill,…
Louise
  • 3
  • 2
0
votes
0 answers

Read WAGO PLC Status Register with Structured Text

I have a WAGO PFC100 PLC with a Structured Text application running. Now I want to read the PLC's status into a variable. From the handbook I found that the status register is 0xFA0D which can be 1 (STOP) or 2 (RUN) ... but I was not able to find an…
user6214440
0
votes
1 answer

Comparing 2 arrays of characters and finding a match on S7 1500 (PLC)

I am currently working on a small coding exercise on S7 1500 using ST(SCL) where 2 Arrays, A (being the bigger one in length) and B are compared with each other and checked for matching elements. However the array B consists of alphanumeric…
Arjun
  • 9
  • 1
  • 7
0
votes
2 answers

plc structured text loop delay

I am trying to have a loop where it will start at 100 and drop until it hits to a point where the while condition no longer holds true. I started with While Solar_Power_House_W_Solar_PER <= OneHundred AND BatChargePercent < OneHundred DO …
tony1420
  • 1
  • 1
1 2 3
8 9