Sign in to follow this  
Followers 0
mdanielswv18

Moving Ascii Code for laser marker in A series

8 posts in this topic

We have a project using an older A series where we are trying to move ASCII code into a register that is monitored by our laser marker. Basically wanting to send hour and minutes to the laser marker using a code that we came up with for the hour and time. On the Q series we used the following code to move the ASCII characters [$+ D810 D840 D817] this takes ascii characters from the first two registers and places them side by side into registry D817. When trying to do this on the A series we can not use the $+ to combine the ASCII characters because it is not one of the commands. How should we go about carrying this out on the A series? I know there is an [ASC ] command but this will not allow us to comine the two registers. Edited by mdanielswv18

Share this post


Link to post
Share on other sites
Had a quick browse through the manual and i think SADD would do the trick: A-serie manual "addition of character strings", see page 9-51. Hope this helps. Edited by Mitsu

Share this post


Link to post
Share on other sites
One of the first things that I tried to use was the SADD command because looking thru the manual it looked like exactly what I was trying to do, but I couldn't seem to get the format correct for the registers. It would not take the command no matter how I entered it in. I will read over this section in the manual one more time and see if something clicks that did not before. Thanks for the suggestion.

Share this post


Link to post
Share on other sites
It does seem to be the instruction you're looking for since it seems to work exactly the same as $+ in the Q serie. What software and cpu are you using?

Share this post


Link to post
Share on other sites
GX Developer and the cpu is A2USH-S1 When I try to type in the SADD command, I am trying [sADD D810 D840 D817] and it will not accept it. The only way I can get it to take the command is to enter [leda sadd D810] when it does take that command it will cut off the D810 and make it D18. I am not for sure what the LEDA command does either, in the manual it says it will turn on the led on the cpu. Edited by mdanielswv18

Share this post


Link to post
Share on other sites
Ok, in that case: did you download the manual i linked in my previous posts? Page 9-53 has an example. In the A-serie, you need LEDA, LEDB, LEDC for dedicated instructions to work. See page 3-2 for explanation on what it does. You first need to use LEDA or LEDB (execute at rising edge) to indicate which instruction you want to use. You then need to define the data that is needed for the instruction with LEDC and execute the instruction with LEDR. So basically, it would look something like this in your case (i didn't test it, just looking at the manuals): LEDA (or LEDB if you want rising edge only execution) SADD LEDC D810 LEDC D840 LEDC D817 LEDR Hope this helps. Edited by Mitsu

Share this post


Link to post
Share on other sites
Got IT! Thanks so much for the help. i was trying to use the help function to view the commands earlier and the manual I have at my desk did not have all of the LED commands listed out. Following your manual you sent me I laid it out like their example specifying each LED section of the program. Thanks again. This forum is great!

Share this post


Link to post
Share on other sites
Glad to hear it works. The dedicated instruction mechanism in the A-serie wasn't the most elegant (or short) system around. In a case like this, for a simple string addition, you need to write 5 lines of code to execute 1 instruction. Thankfully, Mitsubishi simplified this a lot in the Q serie cpu's.

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