Technical Forum

SIMOVERT MASTERDRIVES

Bit manipulation of control word over profibus comms between S7-300 & masterdrive

Thread Starter: rudolfm001   Started: 3/14/2011 12:58 PM   Replies: 2

« Previous thread Next thread »
Page 1 of 1 (3 items)
  3/14/2011, 12:58 PM
Joined 9/30/2010
Last visit: 4/6/2011
Posts: 4
Rating:
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 

I am using Simovert Masterdrive connected to S7-300 through CBP2 card.
In Hardware configuration the Input address is 256..259 and output address is 256..259 for this drive...and PPO3 is being used.

I understand how to start/stop drive by writing the correct hex value to PQW256 and the same way how to write setpoint value to drive.

My question is this: How do I manipulate the the individual bits inside the control word, via S7 program, so that I can switch the bits one by one on.  

Thank you. 

Top
  3/14/2011, 7:07 PM
Joined 9/27/2006
Last visit: 11/26/2014
Posts: 4869
Rating:
Rated: Excellent [4.22 out of 5 / rated 832 time(s)]. (832) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Hello rudolf;
You con only read and write at the byte, word or Dword level when you use Profibus communications.
If you want to have a single bit modified, then you have to wrtie the new value of the whole word back to the Profibus Control word address.
This is basically what you do when you start the drive. (I am not sure if the values I am using as an example are the same as the ones you use, these are from memory and are based on MM4 experience). To start up, the drive must see a rising-edge on the LSB of the Control word (change the value of the LSB from 0 to 1). So you start by writing w#16#447E to the Control word addrees (therefore setting the LSB to 0) and then you write w#16#447F to the same address, setting the LSB: the drive will now start up and run at the Speed reference that you have set.
Hope this helps,
Daniel Chartier
Top
  3/18/2011, 1:24 AM
Joined 2/7/2008
Last visit: 11/14/2014
Posts: 344
Rating:
Rated: Outstanding [3.88 out of 5 / rated 41 time(s)]. (41) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 

You can manipulate individual words in the local PLC memory and then transfer local memory DWORD on Profibus. For example:
      A     I      0.0
      =     M    256.0

      A     I      0.1
      =     M    256.1

      L     MD   256
      T     PQW  256

Remember the byte swap in the S7 processor.

Top
Page 1 of 1 (3 items)
Actions