Rott202

Analog Input Readings via Profibus-Siemens S7

5 posts in this topic

Hi,

I've been reading the contents of the forum for a while and finally decided to ask a particular question related to a project I'm currently working on:

i) The basic idea is to obtain analog and digital input readings from a DP slave (ET-200) via profibus to a Siemens S7 300 CPU.

ii) I have configured the blocks DP_SEND and DP_RECV according to this :
https://support.industry.siemens.com...dti=0&lc=en-WW

After some troubleshooting the communication is up and running. I am sending the information to a DB comprised of BYTE type entries.

iii) The "remote" modules which will be sending their readings via ET-200 are of this type:

http://www.slo.lt/out/media/siemens....1KF02-0AB0.pdf

I have tested the digital inputs and when I send "1's" to them I can see the change in the Byte entry of the DB related to the Address of that particular module (I understand that that's the main principle of Profibus)

iv) After testing the digital inputs I wanted to test the analog inputs. I have to read temperature values so I configured the channels as PT100's (RTD). I understand that the module gives back a reading which is a signed integer. After I "read" this value I should parse it to DINT, then to REAL and finally multiply it by 0.1 (the final value would be the temperature in Cº).

My problem is that I can't seem to obtain anything logical from these readings. The "Byte" entries of the DB change when I simulate a RTD on that particular channel (which means that something is being sent via PROFIBUS from the module) but I am not obtaining anything close to what is required to obtain a temperature in degrees Celsius. For example, if the RTD is measuring 50 degrees, I should be reading an entry close to 500 on the DB. My readings are much more elevated than that. Also I tried simulating a negative temperature (for example -20 ºC) and I could not recognize the sign bit change. My guess is that something is not being done properly when sending the information from the module to the DB, perhaps I need to have a different type of entry for the DB (for example, I have tried WORD) but that also did not work. At this point I do not know how to fix this. I tried to "monitor" the analog input with the Siemens debugging program but it would not work (this would have allowed me to see what the module is "actually sending" without taking into account the Profibus stuff).

I hope someone has some experience with this...or at least can suggest a possible fix or test to perform. Sorry for the long post!

And thanks!!!
Rott202

Share this post


Link to post
Share on other sites

There is no need for DP-SEND or DP-RECV if you set up your hardware configuration to use the ET200 as a profibus node.

Your ET200 I/O is then configured with normal I/O addresses like Ix.x, Qx.x, IWxxx and QWxxx.

You read and write the addresses like you do with the ones connected to your 300 CPU.

Edit:

What software are you using ?

Step7 classic or the TIA Portal ?

Edited by Bryll

Share this post


Link to post
Share on other sites
3 hours ago, Bryll said:

There is no need for DP-SEND or DP-RECV if you set up your hardware configuration to use the ET200 as a profibus node.

Your ET200 I/O is then configured with normal I/O addresses like Ix.x, Qx.x, IWxxx and QWxxx.

You read and write the addresses like you do with the ones connected to your 300 CPU.

Edit:

What software are you using ?

Step7 classic or the TIA Portal ?

Hi Bryll, 

 

I am using Step 7,  but as far as I know I do not have an "integrated profibus  port".  I have tried using the remote inputs and outputs but step 7 does not recognize them.  For example,  if a remote module has addresses ranging from 600 to 603,  I tried to instantiate I600.1, but it does not get recognized by step 7.  Do you know if I need to configure something for this to work?  I configured the master and the slave,  don't know if something else needs to be done. 

 

Thanks!

Edited by Rott202
Typos (posted from cellphone)

Share this post


Link to post
Share on other sites

What's the part no. of your CPU and ET200 ?

You might have to write to "PI600.1" instead of "I600.1"

Share this post


Link to post
Share on other sites

Well, I finally solved it! I changed the DB entry type from WORD to BYTE. Also, I disabled all the 1FK02 channels but the one that I wanted to test. Afterwards, I ran some tests and I obtained values that were Temp*100. for example, if I was simulating 50° C on that channel, the reading between the two byte addresses belonging to that channel was 5066. Dividing by 100 and adjusting by a factor allowed me to obtain the temperature values. Negative temperatures can also be read, you just have to complement the two bytes (if there's a 1->0 and viceversa) and you obtain the absolute temperature.

I could not access directly to the I/O because my CPU has to use a CP to access the I/O, it does not have "integrated Profibus"

Hope it helps someone! Thank you for your suggestions!!

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