sine wave ? on omron

taward31

Member
Join Date
Nov 2012
Location
Dublin
Posts
51
Hi,

I am trying to produce a sine wave from an omron plc model : CJ1H

I want to do it in ST if possible. I am only learning Structured Text, Take a look at my code so far and let us know what you guru's think

The code is to be used inside a function block,

i:= 0 to 360

i:= 0;


Rads:= i * (2*3.14);

ao_01: = 10 * sin(rads-0);

ao_02: = 10 * sin(rads-2.09);

ao_03: = 10 * sin(rads-4.18);

i:= i + 1;


How would I ensure that the code repeats continuously until I disable the function block?

Any help is greatly appreciated
 
I got it done

Thanks for comments got it done, Just used a milli second pulse to activate the Function block which incremented the i every time. also made i equal to all available bits as 361 degrees = 1 degrees etc
 

Similar Topics

Hello Experts, I am trying to create a SINE Wave generator and i cannot seem to make it smoother. I have done this before but i forgot the exact...
Replies
6
Views
324
Hi dear forum, I need to create a test sine wave that so that I could check settling time in bidirectional inverters. Function that needs to run...
Replies
12
Views
1,189
Hi does any one have or know where I can obtain a function to generate a slow sine wave output of 4-20 ma with variable frequency and amplitude...
Replies
3
Views
3,470
Hi, Any idea how can a generate a sine wave signal of 2Hz where the output is an analogue 4-20mA? This is required for a proportional pressure...
Replies
27
Views
7,131
Anyone have an examplen on how to generate a sine wave in Structured text. Help much appreciated, thanks in advance!
Replies
10
Views
6,653
Back
Top Bottom