Array Help

MxStun

Member
Join Date
May 2013
Location
Nottingham
Posts
4
Hello i am new to PLC programming i am currently working on a project. i have come across a part in my project where i need to implement arrays.

i am using twincat 2 beckhoff plc

i have set my array up like this:

PROGRAM Arrays
VAR

ParameterArray: ARRAY [0..15] OF stParameters;
Arrays:INT;

END_VAR

i have a string set up for the description of that array:

sDescription: STRING;

this is set up in my struct of parameters

so on my page i have a load of text boxes which when i enter the value they set the parameters. what i added is 3 buttons a text box and a label.

the label says:

"recipe Number"
i want the textbox to display the array description the string i understand. which i think is achievable by %s and then linking it to my string.

but what i really want is help for me to add the parameters to the actual array though my save recipe button and then the other two buttons are "Next" and "Previous", this will cycle through my array and show what is set up on each array. then you can save to that array.


can someone please tell me if this is possible through twincat and guidance on how to start it.
if any more information is needed please let me know

Many Thanks
 
so you want array with parameters, why not give also a name and a description to this same type.
stparameter:
name: STRING (20);
description:string (200)
parameter1:INT;
etc.
on the visulaisation it is easier to make other vars for each box.
so if you do a read all boxes are filled
now you can change all your boxes.
if you do a save then the content of the vars is written into the array.
it is a step extra but now you can have an escape button to NOT change anything.

and i am sorry i did not see you before, i only look once a day to this.
(and yes you may PM me.
 
sDescription(80) is my name.

i need to know how to implement the buttons to add the stuff to my array and refresh the page or load the current array stats on the form.
 
see the answer i wrote

general you can in the visualisation is to configure an element, the goto input and put a variable in it with F2
you can even start a complete POU here.
 

Similar Topics

Hello! The equipment I'm working on uses a lot of indexed tags I guess you'd call them. I thought it was indirect addresses maybe but all the...
Replies
9
Views
1,028
Hello all, I need some guidance creating a FIFO array to display data into an HMI. The data will be the sum of jams of a conveyor section in an...
Replies
5
Views
2,668
hi, i try to capture barcode data using UDT with SINT ascii array. i have all the data i need but it in array format, how can i convert to 1...
Replies
5
Views
3,042
Hello all, I'm working on my first project with an Allen Bradley Micro 810 using the connected components workbench. Everything is going well so...
Replies
2
Views
3,128
Hello All, Needing some help with finding Min max values in an array that can have a dynamic element count. The Sort function in Logix 5K only...
Replies
9
Views
5,686
Back
Top Bottom