Sign in to follow this  
Followers 0
Vasa

Mitsubishi Q-Series to PC Interface

58 posts in this topic

Change RX format to ASCII too, and you'll see what you're sending

Share this post


Link to post
Share on other sites
Yeah, I've already done that... seems to be transmitting what I want. So far so good... :)

Share this post


Link to post
Share on other sites
Hey guys, One more question - if I want to add Header (STX) before my string output and Terminator (ETX) after my string output, how do I do it? I tried simply doing a MOV H02 to the beginning of my outut, but it outputs <STX>NULL, and same thing at the end, it outputs <ETX> NULL. How do I avoid outputting those NULLs? Is there a way to make PLC (Q-series) output STX and ETX automatically? Thanks. - VaSA

Share this post


Link to post
Share on other sites
You can set it via buffer memories or the software but I would recommend using your sequence program - that way you'll have better control of the output string. The most likely reason is that when moving "02" you are actually moving "0002". You are using the default "word" mode which outputs every word both high/low bytes. I would write a small sequence program that inserts the control data into your existing string at the beginning and end. Alternatively you can set the card to byte-mode, then it will only output the first byte of every word - this means you'll have to re-write your existing code so that when you move for example: "MOV 'ABCD'" you'll have to use two instructions: 1. MOV 'AB' 2. MOV 'CD'

Share this post


Link to post
Share on other sites
Hey kaare_t, Thanks for the reply, I know why its outputting the NUL, but I cannot figure out how avoid that. I want to keep my output as a string, but you mention a small sequence program that inserts the control data. Could you please give a bit more details on how to achieve that? Thanks. - VaSA

Share this post


Link to post
Share on other sites
Actually it isn't that straight forward... You'll have to start by shifting all your byte's and reassemble them so that they are 1 byte offset for the header to work. I would do a FOR-NEXT loop that offsets all your existing words 8 bits to the right, then splice your new first word (consisting of the original byte) with the header. I would still recommend to use byte mode instead and just set one character pr. word instead of two like you're doing now...

Share this post


Link to post
Share on other sites
Hey kaare_t, We got the first printer running, so everything should be OK from now on, just gotta do two more. So anyway, just wanted to thank you, since I wouldn't have done this without your help. Also want to thank everybody else who gave me advice. Thanks! - VaSA Edited by Vasa

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