Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
0 votes
0 answers
82 views

I have the following function block: FUNCTION_BLOCK FB_GenericsTest VAR_GENERIC CONSTANT SIZE: INT := 1; END_VAR Which has this FB_Init method: METHOD FB_Init: BOOL VAR_INPUT bInitRetains: ...
1 vote
2 answers
115 views

I'm working on a Twincat project where I need to use 1 PLC to manage a set of stepper controllers driven by simple digital outputs. I've got a function block for driving the stepper when commanded ...
1 vote
1 answer
376 views

I use TwinCAT and structured text to develop my application. What will happen when I assign a UINT (e.g. obtained from the modbus register) to an Enum variable where the UINT value is not a valid Enum ...
Stefan's user avatar
  • 1,367
1 vote
2 answers
227 views

My main language is embedded C/C++, but I have a little background in structured text and worked with Codesys a while back in school. I am still figuring out what is possible and best practice in the ...
0 votes
2 answers
92 views

Trying to create an incredibly simple program for a CX9020 where pushing a button triggers an LED to light up for 250ms and then turn off. Code is: PROGRAM MAIN VAR tonPulseTimer : TP; END_VAR IF ...
0 votes
0 answers
64 views

I'm currently working on a project where we write PLC code/logic using Structured Text in OpenPCS (IEC 61131-3 compliant). We're trying to enhance our development process through support of automated ...
0 votes
3 answers
186 views

Referring to the Beckhoff documentation, can the FindAndReplace operate on an inplace string? Or in other words, can pSrcString and pDstString refer to the same string variable?
Izzo's user avatar
  • 4,958
0 votes
0 answers
92 views

I've got a FP-X C60R Panasonic PLC with a AFPX-COM5 module. I have code that increments by 1 every second and it is working. I'm trying to figure out how to send counter value to a modbus holding ...
-1 votes
1 answer
95 views

I am using DELTA PLC AS228T. I wanted to write a program in Structured text. CODESYS support my PLC ? Documentation is not clear.
2 votes
3 answers
225 views

I was wondering if there is there a way to flush the data that is to be written to a file other than closing the file in TwinCAT3? Usually there is a .Flush() method that would move all the data from ...
1 vote
1 answer
294 views

I am wondering what best practices should be used when using analog input cards such as those for thermocouples with TwinCAT. Specifically I am interested in: Correct way of declaring variables for ...
0 votes
1 answer
120 views

I am using CODESYS to plot an array of voltage values in an XY chart in the visualization. The voltage values are updated every second, but I am encountering an issue where the XY chart connects the ...
2 votes
1 answer
741 views

I am writing a program that loops through an array to check Boolean alarm variable statuses. I want to dynamically generate the for-loop count integer to end the loop. I have looked through Benchoff's ...
0 votes
0 answers
55 views

I am new to structured text and barely getting started . I need to copy 8 bytes of data I receive over a CAN to another variable in structure in Structured text . Here is my code TYPE msg : UNION ...
1 vote
1 answer
245 views

I decribed M-function in System Manager, but how can I proggram logic for it in ST? I know how to build\clear interpolation group, link axis, load nc program. For example, my nc file should be like ...

15 30 50 per page
1
2 3 4 5
...
10

AltStyle によって変換されたページ (->オリジナル) /