Posted 4 Apr 2017 Hello, i have DOP-07s411 delta hmi and i want to interface it with microcontroller using modbus (RTU) protocol over RS485( 8 bit data,1 stop bit, parity none,19200 baud rate). i have good speed of communication if i do not use macros. But as i place background macro(background macro is only 4 lines ) it slow down and updates the display at every 3 seconds. i cant able to figure out what is the problem. I want to update display of HMI very fast.Please help me to troubleshoot the problem. Share this post Link to post Share on other sites
Posted 4 Apr 2017 Hi Unobtainium. What type of macro are you running? Screen Open Macro / Screen Close Macro or Screen Cycle Macro? and what is your macro doing? Cheers Guy Share this post Link to post Share on other sites
Posted 4 Apr 2017 Hello, Thanks for your reply, I am using BACKGROUND macro. following are the commonds which i have used in macro to convert two 16 bit of data in single 32 bit data. [Y]= {LINK2}1@W40001 && 15 [TEN-Y] = [Y] * 65536 (DW) [Z] = {LINK2}1@W40002 >> 16 (DW) [P]= [Z] + [TEN-Y](DW) Share this post Link to post Share on other sites
Posted 5 Apr 2017 The background macro will run continuously regardless of what page you are on which is why things are slowing down. How many lines have you set the background macro update cycle to run at? Do you need these calculations to run for every page and continuously? If so I would move the calculations to the PLC if possible. If you only need this calculation for a specific page then move the macro to that particular page. If your system can handle the macro running every few seconds then would advise adding some sort of trigger to activate the macro to prevent it from running all the time, this can be done by changing the macro to a clock macro instead of a background macro or build in a delay timer. Cheers Guy Share this post Link to post Share on other sites
Posted 5 Apr 2017 Hello , Thanks for your reply i have used background macro to combine two 16 bit data to get my final data of 32 bit. Hmi receives that data from micro controller continuously so It is required to run continues in background It is not possible to do this calculation in my controller. i have 32 bit of data to send from micro controller to hmi among them 0-24 bits are my data bits and 24-32 bits are decimal point location. HMI receives this 32 bits data as a two 16 bits data so i have to separate decimal point location from data and convert remaining bits into 24 bit data to display it correctly. Share this post Link to post Share on other sites
Posted 5 Apr 2017 how many pages does your HMI program have? Share this post Link to post Share on other sites
Posted 5 Apr 2017 Hello, Thanks for your reply Till now its only one page but upto final project it may be 10 or 15 pages Share this post Link to post Share on other sites
Posted 5 Apr 2017 I would change the macro to a clock mancro and set it to run every few seconds or so unless you absolutely need it to update faster. also move the macro to the specific page you need to view the data on so that when you add the additional pages the macro will only run when required. Out of interest what PLC are you using? Share this post Link to post Share on other sites
Posted 5 Apr 2017 Hello, Thanks for your reply, Till now i have only page and its updating slow, I have placed same macro routine in screen cycle macro and checked but it also very slow as 2 second. Share this post Link to post Share on other sites
Posted 5 Apr 2017 when you say "I have placed the same macro routine in the scrren cycle macro" do you mean you made a copy of it and left the original macro as a background macro or did you delete the background macro from the macro list? Share this post Link to post Share on other sites
Posted 5 Apr 2017 (edited) Hello, Thanks for your reply, of course i have deleted macro lines from background macro. There is only one macro running at a time. Edited 5 Apr 2017 by Unobtainium Share this post Link to post Share on other sites
Posted 6 Apr 2017 Does your macro have the "END" function included? Share this post Link to post Share on other sites
Posted 6 Apr 2017 Hello, Thanks for your reply yes i have included "END " at the end of macro Share this post Link to post Share on other sites
Posted 6 Apr 2017 interesting. I have sent you a pm. Share this post Link to post Share on other sites