I'm having an issue with this rung. I've tried with and without ONS and I can't seem to understand why it wont work.
and yes the routine is added as a JSR in the main routine.
That all looks good - I'm just about out of ideas. Have you tried substituting another simple non-arrayed string as the source? Do you have a similar MID function working in another section of your program?
That all looks good - I'm just about out of ideas. Have you tried substituting another simple non-arrayed string as the source? Do you have a similar MID function working in another section of your program?
I think it has something to do with the length like u said. When i use the cps instruction to copy the length of the barcode to a dest. The source is a int and the dest is a dint. could that cause a problem?
what would be the best way to convert a int to a dint value?
I had a problem with a barcode reader in that, even though the strobe went TRUE the entire string was not in the result array yet. I waited until the length was something reasonable then copied. No problems after that.
That all looks good - I'm just about out of ideas. Have you tried substituting another simple non-arrayed string as the source? Do you have a similar MID function working in another section of your program?
It worked thank you. The problem was using the CPS instruction to copy the int length to a tag with a dint length. so i replaced it with a mov instruction instead of cps and it worked.
Thank you so much for the help. I really appreciate it.