Posted 4 May 2014 I was wondering if anyone knew if DATERD is valid for A2SH plcs. I can get it to work correctly on A2USH plcs but not A2SH. If it is not supported does anyone have a suggestion on separating year, month, date, hour, ect into different addresses. Share this post Link to post Share on other sites
Posted 5 May 2014 Not sure if it's valid, but if it doesn't show up in the instruction list it's probably not valid. You can read out the values directly from the dataregisters, and mask out the bytes you need for each item. To mask out the "right" lower byte use "OR 16#00FF..." together with the dataregister, to mask out the "left" higher byte use shift right 8 bits "SHR K8..." together with the dataregister. To explain, when using OR 16#00FF you are setting the high byte to 0 (00) and setting the lower byte to the value of the original lower byte. When using SHR you are getting the high byte from the original dataregister and moving it into a new dataregister. Let us know if you run into problems. Share this post Link to post Share on other sites
Posted 5 May 2014 (edited) OK. So i had a lot of problems with the SFTR so what i ended up with is below. I havent tried it yet but I will tomorrow. Edited 5 May 2014 by Dot.ss Share this post Link to post Share on other sites
Posted 6 May 2014 I'm no GX Developer expert, but I don't think your example will work. Check out the following example and let us know what you think, or even better how it works... Share this post Link to post Share on other sites
Posted 6 May 2014 So i tried both today. Yours is easier on the eyes and so i like it better. Both appear to be working and are running as a trial. One thing that confused me was after the SFR on after moving D9025 it came up with a "20" value. This was simply corrected by doing a BIN conversion after realizing the problem. This is being used as part of the PLC program to generate serial numbers. After the PLC generates the serial number then I'm using VB and MX component to print a barcode and save data into a file. Share this post Link to post Share on other sites