S7-300 programming

saxon

Member
Join Date
Dec 2010
Location
Athens
Posts
6
Hello to every body,

I am a very new user of PLCs. I have a S7-300 with AI, DI, AO and DO. I collect 4 4-20mA inputs, calculate 2 parameters (which are a combination of this inputs and i must send 2 analog outputs (4-20mA) to an ABB inverter. The problem i have is that i do not know how i can interpret the calulated outputs to the PQW288 and PQW290. At SIMATIC MANAGER i take a parameter which is a real value (floating point lower than 1), i multiply it with 27648 and then i move it to PWQ288. the value i take is of the form 16#449c000 but when i measure with a current meter i take apermanent value of around 4 mA. can anybody help me with that?

please forgive me for my English and very poor knowlegde with PLC programming. any assistance will be much appreciated
 
I use the MOVE command and assign MD20 (floating point) to MD22 (HEX) and then i use the MOVE command again to assign it to PQW 288.

This doe not seem to work, because the current amount fluctuates alot.
 
In S7 manager:
Open + Library + TI-S7 Converting Blocks
You will find the treasure FC106 UNSCALE.
(y)

Kalle



Did you look as suggested.

Siemens standard blocks

FC105 - Takes an analogue in and scales it to a REAL value

FC106 - Takes a REAL value and scales it for an analogue out.
 
I use the MOVE command and assign MD20 (floating point) to MD22 (HEX) and then i use the MOVE command again to assign it to PQW 288.

This doe not seem to work, because the current amount fluctuates alot.


Doesn't work like that, you need to convert using the commands

ROUND (Round Double Integer) reads the content of the IN parameter as a floating-point number and converts it to a double integer (32-bit). The result is the closest integer number ("Round to nearest"). If the floating-point number lies between two integers, the even number is returned. The result is output by the parameter OUT. If an overflow occurred ENO will be "0".

or

CEIL (Ceiling) reads the contents of the IN parameter as a floating-point number and converts it to a double integer (32-bit). The result is the lowest integer which is greater than the floating-point number ("Round to + infinity"). If an overflow occurs, ENO will be "0".

or


FLOOR (Floor) reads the content of the IN parameter as a floating-point number and converts it to a double integer (32-bit). The result is the greatest integer component which is lower than the floating-point number ("Round to - infinity"). If an overflow occurred ENO will be "0".
 
Thanks,

i installed the FC106 and it seems to work, although i am not sure yet about the values. what should i do in order to use it for two outputs (i use the OB35).

also how do i use the the FC105 for 4 analog inputs? where can i find a simple (idiot proof manual) for programming S7-300 PLCs?

I try many days to make it work, but it is very difficult to proceed to the end (i am a chemical engineer and not a automation engineer.

thanks for your assistance
 
You use the CF105 and FC106 as many times as you want.
Each time you assign a different input or output to the block.
Each instance of the block will work for each of your Inputs and or outputs depending which block you use.
How's the weather in Athens?
Still warm?
 
Thanks,

i installed the FC106 and it seems to work, although i am not sure yet about the values. what should i do in order to use it for two outputs (i use the OB35).

Call it twice, the first time parameterised for the first analogue, the second time for the second.


also how do i use the the FC105 for 4 analog inputs? where can i find a simple (idiot proof manual) for programming S7-300 PLCs?

call it 4 times, each call paramerterised for the individual analogue.
 
programming with S7

hello to everybody,

as said before, iam a very-very new in S7 programming, and i can not find a manual (idiot proof...like me) where i can set up a method to use FB, FC and DBs. i know only to work with OB1 and nothing else. Can anybody advice anything ?

I send my best wishes for a healthful 2011 (I think this wish is always the best) to everybody

Saxon
 
When you open a project, it automatically presents you with the user projects tab.

Go to the sample projects tab and look at one of those projects.

Also, re-reading your previous posts:

'I use the MOVE command and assign MD20 (floating point) to MD22 (HEX) and then i use the MOVE command again to assign it to PQW 288.'


MD20 is 4 bytes, made up Bytes 20, 21, 22 and 23.
MD22 is also 4 bytes made up of Bytes 22, 23, 24 and 25.

Therefore you have cross contamination of bytes 22 and 23.
 
Hello saxon;
I would recommend this Getting Started manual for S7 PLCs: Working with Step 7.
It will show you the basics of proframming a FB + Instance DB, a FC and a shared DB, so you can then apply this in your programs.
You can download a copy here:
https://support.automation.siemens.com/WW/llisapi.dll?query=Working+with+step+7&func=cslib.cssearch&content=adsearch%2Fadsearch.aspx%3Ftab%3D2&lang=en&siteid=csius&objaction=cssearch&searchinprim=_searchinprim_&nodeid=99&x=16&y=8&cssearchengine=NEW
Hope this helps,
Daniel Chartier
 

Similar Topics

Hey Guys I am trying to figure out the correct cable to use to connect from my laptop to this Panelview using panelbuilder32. I was sure I had...
Replies
5
Views
2,043
Hi Sir, I am using S7-300/400. I am usually using FC 03 and FC04 to transfer (R/W) bool values by moving them DBs. However i want to R/W bool...
Replies
1
Views
2,060
Hi, I have a 315-2 PN/DP CPU. It was programmed in Step 7 V5.5. Then a colleague programmed it in TIA Portal V13 for a test. Now I want to...
Replies
6
Views
2,276
I'm new in STL programming, today I was checking some example codes and found this: L 1 L QB 4 SLW T QB 4 SET SAVE...
Replies
5
Views
2,559
Hi guys, once more I need your help: Siemens Part Number 6GK1571-0BA00-0AA0, (see the attached image) is this the correct part for...
Replies
4
Views
2,334
Back
Top Bottom