Sign in to follow this  
Followers 0
abdullah eraslan

array and string

7 posts in this topic

hi all 

I do not know why arrays and strings are used in plc programming. Where are they used in the application?

Share this post


Link to post
Share on other sites

String is very useful if you want to send character from PLC to be display to the HMI.

 

In small application you don’t need an array, but for larger application array is great option, especially when you want represent multiples values in single variables.  Example in data block an array of [1..30] real - Temperature.  So instead of writing individually to access all those 30 temperature value, just do it in an array to save time, space and easy to remember during your programming.

Share this post


Link to post
Share on other sites
On 19.12.2017 at 9:00 AM, Jairus said:

String is very useful if you want to send character from PLC to be display to the HMI.

 

 

 

In small application you don’t need an array, but for larger application array is great option, especially when you want represent multiples values in single variables.  Example in data block an array of [1..30] real - Temperature.  So instead of writing individually to access all those 30 temperature value, just do it in an array to save time, space and easy to remember during your programming.

can you give me specific example.I did not understand your example.

Share this post


Link to post
Share on other sites

an example is barcode scanner that reads label and sends you back the string.

another example is if you want to print label, printer will need information in a form of a string.

Share this post


Link to post
Share on other sites
On 21.12.2017 at 5:06 PM, panic mode said:

an example is barcode scanner that reads label and sends you back the string.

another example is if you want to print label, printer will need information in a form of a string.

pleasea give an example in industrial automation

Share this post


Link to post
Share on other sites

That IS an example in industrial automation. Anything automotive will have label (every component). Another examples would include logging data, part tracking using RFID tags, setting drive parameters, getting data from scale or flow meter or vision system or ECU and many more.

 

What kind of automation you do?

Share this post


Link to post
Share on other sites

We are using a lot of strings in arrays.

There where you talk about customer name, adres, settings etc.
If you use this in the PLC in stead of in the HMI, this give a lot more possibility in case of sorting and logging settings in the plc memory.

an "tekstlist in an HMI solution" is to static for doing this.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0