{"id":3969,"date":"2019-02-12T16:10:15","date_gmt":"2019-02-12T16:10:15","guid":{"rendered":"https:\/\/cyflexdoc.wpengine.com\/usage-help-manual\/1-utilities-and-user-commands\/squarew\/"},"modified":"2026-03-03T13:09:09","modified_gmt":"2026-03-03T18:09:09","slug":"squarew","status":"publish","type":"page","link":"https:\/\/cyflex.com\/index.php\/usage-help-manual\/11-utilities-and-user-commands\/squarew\/","title":{"rendered":"squarew"},"content":{"rendered":"<div>\n<h3>Purpose:<\/h3>\n<\/div>\n<dl>\n<dd>\n<p>Apply a square wave to a CyFlex variable by superimposing an offset with the specified amplitude and frequency for the given duration.<\/p>\n<\/dd>\n<\/dl>\n<h3>Enter:<\/h3>\n<dl>\n<dd>\n<p><strong>squarew<\/strong> &lt;variable&gt; &lt;offset&gt; &lt;amplitude&gt; &lt;frequency&gt; &lt;duration&gt;<\/p>\n<\/dd>\n<\/dl>\n<h3>Where:<\/h3>\n<dl>\n<dd>\n<div>\n<table style=\"width: 87.2297%;\" cellspacing=\"0\" cellpadding=\"0\">\n<colgroup>\n<col \/>\n<col \/> <\/colgroup>\n<tbody>\n<tr>\n<td style=\"width: 9.68532%;\">\n<p>variable<\/p>\n<\/td>\n<td style=\"width: 135.311%;\">\n<p>Specify the name of a current CyFlex variable to which a square wave is applied.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 9.68532%;\">\n<p>offset<\/p>\n<\/td>\n<td style=\"width: 135.311%;\">\n<p>Specify the offset value to superimpose on the square wave function in units of the target variable.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 9.68532%;\">\n<p>amplitude<\/p>\n<\/td>\n<td style=\"width: 135.311%;\">\n<p>Specify the amplitude of the square wave function in units of the target variable.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 9.68532%;\">\n<p>frequency<\/p>\n<\/td>\n<td style=\"width: 135.311%;\">\n<p>Specify the frequency of the square wave function in hertz.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 9.68532%;\">\n<p>duration<\/p>\n<\/td>\n<td style=\"width: 135.311%;\">\n<p>Specify the duration of time in seconds to apply to the square wave function.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/dd>\n<\/dl>\n<h3>Example:<\/h3>\n<dl>\n<dd>\n<p><strong>squarew<\/strong> gen_square 10 3 1 10<br \/>\nThe above command applies a square wave function to the variable gen_square as follows:<\/p>\n<p>offset of 10, amplitude of +\/- 3, frequency of 1 hz, duration of 10 seconds.<\/p>\n<\/dd>\n<\/dl>\n<h3>Notes:<\/h3>\n<dl>\n<dd>\n<p>The square wave is applied until the specified duration is reached and the value returns close to the offset.<\/p>\n<p>The smoothness depends on processor availability and is updated at the CyFlex fast process interval (usually 20 Hz).<\/p>\n<p>The variable must be a valid existing CyFlex variable and is not created by this command.<\/p>\n<\/dd>\n<\/dl>\n<h3>See Also:<\/h3>\n<dl>\n<dd>\n<p><a href=\"\/index.php\/usage-help-manual\/11-utilities-and-user-commands\/ramp\/\">ramp<\/a>, <a href=\"\/index.php\/usage-help-manual\/11-utilities-and-user-commands\/sine\/\">sine<\/a><\/p>\n<\/dd>\n<\/dl>\n","protected":false},"excerpt":{"rendered":"<p>Purpose: Apply a square wave to a CyFlex variable by superimposing an offset with the specified amplitude and frequency for the given duration. Enter: squarew &lt;variable&gt; &lt;offset&gt; &lt;amplitude&gt; &lt;frequency&gt; &lt;duration&gt; Where: variable Specify the name of a current CyFlex variable to which a square wave is applied. offset Specify the offset value to superimpose on [&hellip;]<\/p>\n","protected":false},"author":47,"featured_media":0,"parent":1948,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-3969","page","type-page","status-publish","hentry"],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/pages\/3969","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/users\/47"}],"replies":[{"embeddable":true,"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/comments?post=3969"}],"version-history":[{"count":0,"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/pages\/3969\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/pages\/1948"}],"wp:attachment":[{"href":"https:\/\/cyflex.com\/index.php\/wp-json\/wp\/v2\/media?parent=3969"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}