Sign in to follow this  
Followers 0
RTRBURN

R Data Register on Q series

15 posts in this topic

I am tryin to activate the R file register in a New Q02HCPU. I have went into Tools/Options/Each Program and made sure that the R was selected for All Programs. Is there some where else I need to change a setting? Im looking throught the Q series Programming manual and don't see anything where to change plc settings to allow the R file register to become active. Thanks to anyone one who could shed some light.

Share this post


Link to post
Share on other sites
You have to turn them on in the PLC parameters. On the "PLC File" tab, change the "File Register" setting to either of the alternative settings to set where they are stored. That should be it!

Share this post


Link to post
Share on other sites
Thanks, found it. Now Im tryin to figure out which bit I need to turn on to flip the Hex so my ASCII reads correctly. This is how my BMOVP reads: [bMOVP D1000 D4500 K54] Im having problems with my D4500 displaying the ASCII characters backward/flipped on my HMI ASCII display. Im using a GOT 1000

Share this post


Link to post
Share on other sites
That's just how data registers store ASCII hex code. First character in "least-significant" byte, and second character in "most-significant" byte. Since we read left-to-right, they show up backwards. There's no way that I know of to change that behavior, and I would be surprised if it exists. You can use the WTOB (word-to-byte) command to move each hex character into it's own register, and adjust the GOT1000 to display it. The BTOW (byte-to-word) command does the reverse, and you could use the two commands to physically swap the positions of the bytes. I think the Q might have a command to swap them, but I don't have the manual handy. Just remember that changing the positions will mess up the information for use as an ASCII string.

Share this post


Link to post
Share on other sites
for Upper and lower byte exchanges use the SWAP instruction.

Share this post


Link to post
Share on other sites
the SWAP command only works for 16bit. Im needing to swap all 53 registers? I don't see a BSWAP in the manual plus it says its an invalid command on GX Developer. Any other ideas? Thanks for all the info guys.

Share this post


Link to post
Share on other sites
I dont have GX Developer on the PC i'm writing this on, but you could possibly index through the 53 registers and swap them using indirect addressing.

Share this post


Link to post
Share on other sites
Use a FOR loop: --| SM400 |-----------------[ RST V0 ]-- -----------------------------[ FOR K53 ]-- --| SM400 |------------[ SWAP R0V0 ]-- --| SM400 |------------------[ INC V0 ]-- ---------------------------------[ NEXT ]-- You can use a data register instead of a constant in the FOR instruction if you have variable lengths of data. Edited by JRoss

Share this post


Link to post
Share on other sites
Your HMI obviously uses the other method of ASCII, where the most significant is the first character. Most HMI products have a way to transpose them on the screen. At least the GOT family does. Perhaps your HMI doesn't understand how Mitsubishi PLCs work.

Share this post


Link to post
Share on other sites
Thanks Guys. Its a Mitsubishi GOT1000 GT1585S HMI, I need to check into this GOT1000 a little more...I know you have to use the newest version of GT Designer to right screens to it. It also wont let you cut and paste from other GOT projects that are not GOT1000 based. Im using an ethernet communcation module on the back to communicate to the Q series that also has an ethernet card also. What it is Im doing is getting data (53 registers, Product info, material info, specs) from a Bar Code that is read from a VB based PC. Im transferring that data to the PLC and HMI for the operator to see and confirm each Product they build. When Im transferring the data from PLC to the HMI its just my ASCII characters are backwards: EX: Im getting = IMSTBUSIIH Should be = MITSUBISHI I'll keep you all posted.

Share this post


Link to post
Share on other sites
If you have defined variants, then just use the compare instructions to "compare" your barcode string to your known product types, instead of trying to work in ASCII - use the Hexidecimal equivilents to decide what you are running. In a recent application i only needed to compare a few D registers to discriminate between products. Once you have a valid product - move a unique number to a Product D register and use a textlist to display on your HMI.

Share this post


Link to post
Share on other sites
Ah, now I see the problem. In your ASCII Display/Input, bring up the extended tab and uncheck the checkbox marked "Display in order of High -> Low". That should fix it.

Share this post


Link to post
Share on other sites
No problem!

Share this post


Link to post
Share on other sites
That's the setting I was referring to.

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