Array indexing

MSutton

Member
Join Date
Sep 2015
Location
Birmingham
Posts
5
Hi
Using RSlogix 5000 v13. I need to enter data from a hmi to an array ie StoreBarCode[0] where storebarcode is a string array. The code gets stored to StoreBarCode[0].productid. How can I index the position automatically to store the next data input in StoreBarCode[1] etc.
Thanks
 
Last edited:
Put a tag in where you have [0], e.g., [index]. Then in the program change the value of index.
 
It partly depends on the HMI. In some you can set a 'handshake' action. The HMI sets a separate bit in the PLC when the operator presses the Enter key. The control is locked until the PLC sets a second bit to indicate that it received and has processed the information.

The PLC program could use this event to store the entered number in the current indexed position and then add 1 to the index for the next entry. You would probably also need some way to start the index in the PLC at zero, or whatever, to begin the entry sequence.
 

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,046
Hello All, I am fairly new to the controls engineering roll and need help with stepping through an array. I need to compare a 16 bit array one...
Replies
7
Views
1,877
Hi guys! Imagine you got taks someting like this: You got 6 motors and under some conditions you have to start one of them. That "one of them" has...
Replies
19
Views
5,854
Hi, We are developing an application on a S7-1200 that we have to use MB/TCP with. All is working ok, but we need to transfer recipe data from the...
Replies
6
Views
3,580
An interesting read for 2 hidden functions that i hadnt seen before...
Replies
2
Views
3,545
Back
Top Bottom