Profibus slave mapping for intel - motorola mode

P

Thread Starter

Pravin

Hi

I am having a doubt regarding the intel-motorola format used by the microcontroller and PLC respectively.
I am developing the interface for the SPC3 ASIC and the PLC s7 300. Till now with the help of the DPS2 software I have arrived at the data exchange state and the data exchange is possible however the problem is that when I use a 32 byte Digital output module and send the output from the PLC as QWXXX the data received in the receive buffer of the microcontroller is in the motorola format.
Now if I send the data from the PLC byte by byte by using QB the data is received properly.

In the configuration of the modules I can use the 32 bit or 16 bit modules and the analog modules also. for the analog modules we can interchange the two bytes directly but for the digital modules. how it should be done as accessing QW or QD from the PLC is not informed to the microcontroller.

suppose if we reverse the whole buffer and then access the word or byte or double word, will it help?

Please help me in this regard.

Thank You
 
P

Paulo Silva (PROFIBUS Center Netherlands

Hello Pravin,

The profibus standard defines integers as being in the motorola format (high-low). In order to become PLC independent you can introduce a parameter in your GSD & device that switched between motorola and intel format. Be aware that the default format is motorola format, and the intel format is basically a 'user defined' format. Many vendors have adopted this method, in order to be independent of the PLC the client/user uses.

If you need details, let me know.

Best regards,

Paulo Silva
[email protected]
http://www.profibuscenter.com
 
Top