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,598
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
85
I've blown the Output Transistor on the Output Card of a Compact Logix 1769-L24ER-QBFC1B It says J378. Does anyone know the replacement part...
Replies
3
Views
167
I am having trouble with getting no control of my analog output signal. I am using the SCL function block to control my analog output. The logic...
Replies
11
Views
210
I was wanting to see if anyone had any information on setting up a cub5 meter and getting the data to a Allen bradley PLC. I think i have the set...
Replies
0
Views
110
Back
Top Bottom