S7 sinus compact generator

komatic

Member
Join Date
Apr 2007
Location
Ukraine
Posts
29
Hi All
I need litle and compact sinus generator in S7, with variable amplitude and period.
Output must be real.
Have someone already made?
TNX
 
S7 200 or 300/400 ?
What are the limits for the period ?
What is the use for the sine wave - how much harmonics content is permitted ?
 
If it is an S7-300/400 then what is wrong with SIN ?
Input is a REAL radians, output is a REAL amplitude.
L MD1000
SIN
T MD1004
Doesnt get more compact than that.
Arranging the input angle into radians and output to the desired amplitude ought to be trivial.
 
L D[AR2 said:
S7 200 or 300/400 ?
What are the limits for the period ?
What is the use for the sine wave - how much harmonics content is permitted ?

I need generator for 300/400

period 1 sec-10 min

harmonics content not principle
 
What is stopping you ?

Oh well, here we go:

Set the setpoint for an IEC timer to whatever full period the sinus curve must have. Then program it to restart when it times up.
If it is set to 30 seconds for example, it will go through 0-30000 milliseconds.

//This is the part where you calculate the radians:
//(TimedTime/Fullcycletime) x 2 x Pi
L "Timer".ET
DTR
L "Timer".PT
DTR
/R
L 6.2831853 // 2 x pi
*R
T "rRadians"

// this is the part where you generate the sinus value
L "rRadians"
SIN
T "rAmplitude"

edit: I had swapped .ET and .PT.
 
Last edited:
JesperMP said:
What is stopping you ?

Thanks a lot for advice.
I made this:
==================================
AN "TP_DB".Q
= "TP_DB".IN

CALL "TP" , "TP_DB"
IN:=
PT:=T#10S
Q :=
ET:=
L "TP_DB".ET
DTR
L "TP_DB".PT
DTR
/R
L 6.283185e+000 // 2 x pi
*R
SIN
T MD 100
=====================================

And this work, i'm HAPPY :)
 

Similar Topics

Hi there! I have a motor with encoder. With this encoder I can calculate which angle the motor is making. I want to show the actual angle of...
Replies
3
Views
1,602
Hello Everyone, I have a issue with communication between two different PLCs. So here is the facts, The Master PLC is Guard Logix 5069 with IP...
Replies
4
Views
87
What happens if you power up a 1783-MS10T with a Compact Flash card from a 1783-MS06T? Does it work, but with the "extra" ports unconfigured? If...
Replies
0
Views
74
gents, I am trying to configure communication with EMERSON PK300 controller through port A1 using generic ethernet communication module . I could...
Replies
0
Views
98
My PLC is currently running the program and the process is still live. One of my 1769-if16C cards values are all frozen but the card is not...
Replies
1
Views
123
Back
Top Bottom