
adccommunitymod (AutomationDirect) asked a question.
Created Date: March 26,2013
Created By: russh
**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****
I am using a Do-More H2-DM1E CPU. I am programming it using the CPU Serial Port, with a WINDOWS 7 PRO laptop running the D0-More Designer software. The program is not large (456/65536). In a Program Code Block I have a MEMCOPY that is moving C1-C7000 to MC1-MC7000. When this is allowed to run the serial communications to the CPU has troubles - flashing an ERROR! about once a second, and displaying ST1 (always ON) bits going ON and OFF. When I HALT the Program Code Block the comms goes back to normal. I have tried using the CPU USB connection with the same result. Has anyone seen this, or know of a way around this?
Created Date: March 26,2013
Created by: Do-more PE
It seems to work fine for me.
Please post your program so that we can see what you are doing different.
Created Date: March 27,2013
Created by: russh
Thanks for your response. I have modified my original program so you can see the issue more clearly. In the "Modbus " Program Code Block there are 3 bits - C7001, C7002 and C7003, that can be used to activate the 3 MEMCOPY's. On my system, turning C7001 ON is fine. Turning C7002 ON makes the serial communications to the CPU go crazy. The third bit is there for good measure.
Is there a size limit for MEMCOPY?
Thanks for looking at this.
Created Date: March 27,2013
Created by: BobO
It is killing the scan time. Doing a MEMCOPY on 7000 bits is *very* inefficient and is driving the scan time through the roof, which is killing the comm. Since you are doing a bulk memory move, do it as DWORDs by casting the bits. Try something like this...MEMCOPY from C0:SD to MC0:SD for 219 elements. This will copy C0-C7007 to MC0-MC7007 far, far more efficiently than using 7000 single bit transfers.
It also bears mentioning that there is no limitation on using the MC block in the program. If all you are doing is blindly copying MC to C, it is probably easier to directly reference MC addresses in the program.
Created Date: March 27,2013
Created by: BobO
Disregard my statement about the blind copy. There is an obvious advantage in what you are doing to prevent the Modbus server from writing to internal values. You are doing exactly the right thing. Still need to change from a bit copy to a dword copy though. ;)
Created Date: March 27,2013
Created by: russh
Thanks, BobO, for the clarification on the C to MC copy. I will try the Dword copy - thanks for the help.
Created Date: March 26,2013
Created by: russh
I am using a Do-More H2-DM1E CPU. I am programming it using the CPU Serial Port, with a WINDOWS 7 PRO laptop running the D0-More Designer software. The program is not large (456/65536).
In a Program Code Block I have a MEMCOPY that is moving C1-C7000 to MC1-MC7000. When this is allowed to run the serial communications to the CPU has troubles - flashing an ERROR! about once a second, and displaying ST1 (always ON) bits going ON and OFF. When I HALT the Program Code Block the comms goes back to normal. I have tried using the CPU USB connection with the same result.
Has anyone seen this, or know of a way around this?