Sign in to follow this  
Followers 0
heron8888

Help with string lengths required

3 posts in this topic

I am scanning labels into a micrologix 1500lrp unit port 1 I need to scan 3 labels, all with different lengths, the first is 6 long, the second 9, and third 12 or possibly variable long, I am using the ard command, and want the first transferred to st15:1, 2nd to st15:2, and 3rd to st15:3, my program works and scans them all but if I set len to 12, it doesent transfer the shorter code due to the dn bit not getting set, any help would be much appreciated

Share this post


Link to post
Share on other sites
Instead of the ARD instruction,use the ARL and set the length to 0. When the termination character is read (CR by default in the comm channel setup), the DN will set when the termination character is read, regardless of string length.

Share this post


Link to post
Share on other sites
Thankyou very much for your help, that worked just as required

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0