instruward
Member
I apologize, I don't know how to word my question properly.
See code snippet for reference: https://imgur.com/a/yPOohZ9
I have an old panelview PB32 program I'm trying to covert over to FactoryTalk. There is a 20 character product code that I need to convert in the PLC so my new HMI can read it.
Currently it stores the characters in N240:20 through N240:29 (for product code #1), for a total of 20 characters. I found some example code online to convert that over to a ST (string) data file.
I am trying to figure out if I can make the attached code be reused for all product codes (over 30).
Like if product 1 name sourced from N240:20 through N240:29, and the destination is ST9:0.DATA[0].
How I can make the attached code's MOV references switch to N240:60 through N240:69, and ST9:1.DATA[0] for product code #2.
See code snippet for reference: https://imgur.com/a/yPOohZ9
I have an old panelview PB32 program I'm trying to covert over to FactoryTalk. There is a 20 character product code that I need to convert in the PLC so my new HMI can read it.
Currently it stores the characters in N240:20 through N240:29 (for product code #1), for a total of 20 characters. I found some example code online to convert that over to a ST (string) data file.
I am trying to figure out if I can make the attached code be reused for all product codes (over 30).
Like if product 1 name sourced from N240:20 through N240:29, and the destination is ST9:0.DATA[0].
How I can make the attached code's MOV references switch to N240:60 through N240:69, and ST9:1.DATA[0] for product code #2.