Modicon Structured Text

snipe

Member
Join Date
Dec 2003
Location
Madison, Indiana
Posts
1
I am using Concepts 2.5 and have a modicon E984-265 controller. I have used the ST to establish and load two seperate word arrays. I am having trouble doing any calculations with the values of individual elements within these arrays in the structured text code. I have been able to move individual elements out and handle the calculations in another Function Block section, but I would prefer to handle all of the calculations within the ST section. I have not been able to find a reference for this kind of application. If anyone knows how to do this within the ST section or knows of a good reference that covers doing mathmatical calculations with individual array elements in ST, I would greatly appreciate some help. Thanks in advance.
 
After you have defined an array, you should be able to invoke individual elements by appending the element number, in brackets, to the array name.

For example with an array of integers called What_I_want:

TYPE
What_I_want: ARRAY [0...9] OF INT;
END_TYPE


to get element 8, refer to it as What_I_want[8]

Also, I believe the Concept ST language is similar to PASCAL.
 

Similar Topics

hi!, I have a program that is made in structured text and I have to convert to ladder diagram, so, anyone know if there is a tool or program to...
Replies
4
Views
6,019
Hello All, I am stumped on how to convert a %MW to a %MF using Machine Expert Basic and a Modicon M221. The help files show a word to a double...
Replies
1
Views
75
A lifetime ago I built a couple systems with Modicon Micro84 controllers that are still running. But today one of those died and they reached out...
Replies
2
Views
85
Everything was working fine, but suddenly CPU went into error mode, and the ERR and TER LEDs lit up. Now I can't download or connect with the PLC...
Replies
0
Views
75
Hello All, Was hoping I could get a little help with Modicon ladder logic. This is the first time I have seen Modicon logic and currently trying...
Replies
6
Views
308
Back
Top Bottom