Assinging to DINT array from numeric display

Hello all, i have a DINT array, lets say 99 entries. Is there any way to assign a value to each array based on which number is selected on the HMI? Say i have an ID numeric entry, and a Length entry the operator selects and enters. The user selects ID 15, and writes 50 into the Length box. The HMI will then write 50 to DINT[15]?
 
If your HMI supports indirect addressing you can do it all within it, how this is handled varies by HMI environment, but usually the ID will be a placeholder internal to the HMI. The "Length" box becomes ExampleDINT[Placeholder].

If your HMI does not support indirect addressing, you can do all of this in the PLC instead using basically the same methods, but will need some extra logic to accomplish. Likely a buffer tag for the "50" and a way to detect that change to know when to write it to 15, or a simple execute button on the screen. Then you can copy it using your ID number to the correct index. Detect a change in index to change the display of the number.
 
Hello all, i have a DINT array, lets say 99 entries. Is there any way to assign a value to each array based on which number is selected on the HMI? Say i have an ID numeric entry, and a Length entry the operator selects and enters. The user selects ID 15, and writes 50 into the Length box. The HMI will then write 50 to DINT[15]?

If you simply want to write a value of 50 (stored in length) to the single array index of 15 (stored in index), that's a simple mov.

MOV length array[index]

If you want to write a different value to 50 array indices starting at 15, then use a FAL.
 

Similar Topics

Hey all, it's my first post. I've been lurking a while. I've got ControlLogix L83E, Studio 5000 v32, pushing production counts to an old Modbus...
15
Replies
615
Views
I'm not sure the how to explain my problem but I'll do my best. For context, the customer has a scale that we need to see be able to read in the...
6
Replies
446
Views
I have created a DINT[50] that is being filed with a ratchet copy. 0-3 are the possible numbers that could be in each. Every trigger ads the new...
9
Replies
450
Views
I created an INT [100] pack named "N51" My source DINT is named "B32" I made a MOVE block to populate the contents of B32 over into N51 beginning...
2
Replies
363
Views
Greetings all. I have a DINT in my CpLX named "Alarms". It is mapped to my ABCIP in Edge but I can't figure out how to access each bit to create...
19
Replies
1,952
Views
Top