Sign in to follow this  
Followers 0
gruntstripe

S7 Lite indirect addressing problem

4 posts in this topic

Hi, Firstly I hope I've titled this topic properly. If you look at my pics you'll see that when I address directly there is an output but when it's done indirectly there is not. Can't see why, can you pint me to my error? M1.0 definately gets set: but only in the first rung here so my number does not get written to the output: using the discrete inputs only - it works: just for interest, when in parallel the middle M bit does not change: Thanks in advance for any help. P.S. I use S7 Lite and find it to be very sluggish in operation, mainly when it's in monitor mode. Networks take ages to update and this is frustrating when troubleshooting. I use a serial MPI / PC adaptor. Do you think things would speed up if I used a USB type?

Share this post


Link to post
Share on other sites
You are cross addressing. S7 Lite has nothing to do with it. In FC30, nets 7, 8 and 9 you are setting bits in bytes 1 and 2, or in other words Word 1. In FC40 you are transferring data to MW0 and MD0, these are the same, also byte 1 is part of MW0 and bytes 1 and 2 are part of MD0. You are using the same memory area multiple times and corrupting your data. MB = Marker Byte = 8 bits MB 0 = 8 bits, these are M0.0, M0.1, M0.2 all the way to M0.7 MB 1 = 8 bits, these are M1.0, M1.1, M1.2 all the way to M1.7 MB 2 = 8 bits, these are M2.0, M2.1, M2.2 all the way to M2.7 MB 3 = 8 bits, these are M3.0, M3.1, M3.2 all the way to M3.7 MW = Marker Word = 16 bits MW 0 = MB 0 and MB 1 = M0.0, M0.1, M0.2 ... M 1.6 and M 1.7 MD = Marker Double MD 0 = MB 0, MB 1, MB 2 and MB 3 = 32 bits M0.0, M0.1, M0.2 ... M 3.6 and M 3.7 So in other words in the first block you are setting bits and the later blocks transferring data into words where the original bits are part of those words, totally corrupting your logic.

Share this post


Link to post
Share on other sites
Thanks Groo, I see what you mean. I'm embarrassed, it's so obvious. Still get a bit confused by memory mapping. I've used different addresses - 'far apart' and now it works. Cheers.

Share this post


Link to post
Share on other sites
Hello gruntstripe. Regarding the slow online update, then yes the serial PC/MPI adapter is infamous for its slowness. Especially if it is set to 19200 baud. The USB adapter is approx 3 times faster than the serial adapter at 38400 baud.

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