painterman
Member
Hello,
I am using studio 5000 pro and am trying to figure out the structured text. Here's my scenario:
An operator scans a barcode, the barcode is processed then the PLC searches an array for that part number. If it finds the number then it will report back the elements in the subtag associated with the number, if it doesn't find the part number it will create a new subtag with the required elements. Well some part nubmers are the exact same the only difference being that some start with a "P" which is no bueno. For example the tag array will have the number 11223344 but the operator scans a barcode that's listed as "P11223344" so it will create a new tag. So far I have over 90 duplicate tags all due to this one letter.
I was hoping there was a way to remove that first letter of the string only if it starts with a "P" I just assumed the best way to do this was structured text, but if there's another way then I would love to know. I have been scratching my head on this for a while now.
I am using studio 5000 pro and am trying to figure out the structured text. Here's my scenario:
An operator scans a barcode, the barcode is processed then the PLC searches an array for that part number. If it finds the number then it will report back the elements in the subtag associated with the number, if it doesn't find the part number it will create a new subtag with the required elements. Well some part nubmers are the exact same the only difference being that some start with a "P" which is no bueno. For example the tag array will have the number 11223344 but the operator scans a barcode that's listed as "P11223344" so it will create a new tag. So far I have over 90 duplicate tags all due to this one letter.
I was hoping there was a way to remove that first letter of the string only if it starts with a "P" I just assumed the best way to do this was structured text, but if there's another way then I would love to know. I have been scratching my head on this for a while now.