Difference between revisions of "MC-Basic:COMMON SHARED ... AS PLS"

From SoftMC-Wiki
Jump to: navigation, search
m
m
 
(18 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Languages}}
+
{{Languages|MC-Basic:COMMON_SHARED_..._AS_PLS}}
 
{{MC-Basic
 
{{MC-Basic
  
 
|DESCRIPTION=
 
|DESCRIPTION=
<big><span style="color: purple">Updated 2018-10</span></big>
+
<span style="color: red">Updated 2018-10</span>
  
 
This command declares a programmable limit switch (PLS) variable.  
 
This command declares a programmable limit switch (PLS) variable.  
Line 21: Line 21:
  
 
|SYNTAX=
 
|SYNTAX=
COMMON SHARED <''pls''> As Pls '<''axis name''> <''output''> {HWAssistance = 1/0 }
+
COMMON SHARED <''pls''> As PLS <''axis name''> <''output''> {HWAssistance = 1/0 }
  
 
|AVAILABILITY=
 
|AVAILABILITY=
Line 31: Line 31:
  
 
|RANGE=
 
|RANGE=
<''axis''>: a valid axis name<br>
+
<''axis name''>: a valid axis name<br>
''<output>'': the name of a system output. System outputs are specified by<br>
+
<''output''>: the name of a system output. System outputs are specified by<br>
 
::System.DOut.''x'', for digital outputs, or<br>
 
::System.DOut.''x'', for digital outputs, or<br>
 
::System.VOut.''x'', for virtual outputs.
 
::System.VOut.''x'', for virtual outputs.
  
The hardware assisted PLS works with System.DOut from 1 to 8
+
<HWAssistance>: 1 activates the PLS high accuracy mode
  
''<HWAssistance>'': TRUE  - starts the hardware assisted PLS  mode
+
The value ''x'' identifies the specific output to be used. It may be explicitly given or it may be an expression. The expression must evaluate to an integer ranging from 1 to 20 for digital outputs or from 1 to 32 for virtual outputs.
  
FALSE
 
 
The value ''x''identifies the specific output to be used. It may be explicitly given or it may be an expression. The expression must evaluate to an integer ranging from 1 to 20 for digital outputs or from 1 to 32 for virtual outputs.
 
  
 
|UNITS=
 
|UNITS=
Line 51: Line 48:
  
 
|SCOPE=
 
|SCOPE=
Configuration or Terminal .
+
Configuration or Terminal
 +
 
 +
In version 4.5.17 and later, the global (common shared) declaration can also be issued from library or task contexts. In those contexts all three parameters of PLS (axis name, system output and HWassistance flag) can be reassigned while reloading the declaring task or library.
  
Since Version 4.5.17 the global (common shared) declaration is also possible from the Library or Task contexts. In those contexts all three parameters of PLS (axis name, system output and HWassistance flag) can be reassigned during the reloading the declaring task or library.
 
  
 
|LIMITATIONS=
 
|LIMITATIONS=
 
Write only
 
Write only
  
HWAssistance feature works for Digital Logic Pentium III CPU  with 8.7.1 Altera version  only !
+
PLS high accuracy (HWAssistance) is limited to System.DOut from 1 to 8.
 +
 
 +
HWAssistance requires Digital Logic Pentium III CPU with Altera version 8.7.1  
  
  
Line 65: Line 65:
 
Common Shared Pls1 as PLS x_axis SYSTEM.Dout.4
 
Common Shared Pls1 as PLS x_axis SYSTEM.Dout.4
  
Common Shared Pls2 as PLS x_axis SYS.Dout.8 HWAssistance = TRUE
+
Common Shared Pls2 as PLS x_axis SYS.Dout.8 HWAssistance = 1
 
 
Common Shared Pls3 as PLS x_axis SYS.Dout.3 HWAssistance = FALSE
 
  
 +
Common Shared Pls3 as PLS x_axis SYS.Dout.3 HWAssistance = 0
  
  
 
|SEE ALSO=
 
|SEE ALSO=
* [[MC-Basic:pls.PLSAXISNAME|pls.PLSAXISNAME]]
+
* [[MC-Basic:CREATEPLSDATA|CREATEDATA]]
 +
* [[MC-Basic:DELETEPLS|DELETEPLS]]
 +
* [[MC-Basic:PLSLIST|PLSLIST]]
 +
* [[MC-Basic:WITHPLS|WITHPLS]]
 +
* [[MC-Basic:pls.HWASSISTANCE|pls.HWASSISTANCE]]
 +
* [[MC-Basic:pls.HWIOtime|pls.HWIOTIME]]
 +
* [[MC-Basic:pls.PLSdelaytime|pls.DELAYTIME]]
 +
* [[MC-Basic:pls.PLSEMENTNAME|pls.PLSEMENTNAME]] / [[MC-Basic:pls.PLSAXISNAME|pls.PLSAXISNAME]]
 
* [[MC-Basic:pls.PLSENABLE|pls.PLSENABLE]]
 
* [[MC-Basic:pls.PLSENABLE|pls.PLSENABLE]]
 
* [[MC-Basic:pls.PLSHYSTERESIS|pls.PLSHYSTERESIS]]
 
* [[MC-Basic:pls.PLSHYSTERESIS|pls.PLSHYSTERESIS]]
Line 78: Line 84:
 
* [[MC-Basic:pls.PLSPOLARITY|pls.PLSPOLARITY]]
 
* [[MC-Basic:pls.PLSPOLARITY|pls.PLSPOLARITY]]
 
* [[MC-Basic:pls.PLSPOSITION|pls.PLSPOSITION]]
 
* [[MC-Basic:pls.PLSPOSITION|pls.PLSPOSITION]]
 +
* [[MC-Basic:pls.PLSPropagationDelay|pls.PLSPropagationDelay]]
 +
* [[MC-Basic:pls.PLSPropagationDisableDelay|pls.PLSPropagationDisableDelay]]
 +
* [[MC-Basic:pls.PLSPropagationEnableDelay|pls.PLSPropagationEnableDelay]]
 +
* [[MC-Basic:pls.PLSRELATEDTO|pls.PLSRELATEDTO]]
 
* [[MC-Basic:pls.PLSREPEAT|pls.PLSREPEAT]]
 
* [[MC-Basic:pls.PLSREPEAT|pls.PLSREPEAT]]
* [[MC-Basic:PLSLIST|PLSLIST]]
+
* [[MC-Basic:element.PLSSOURCE|element.PLSSOURCE]]
* [[MC-Basic:pls.HWASSISTANCE|pls.HWASSISTANCE]]
+
 
  
 
[[Category:MC-Basic:Declarations|COMMON SHARED ... AS PLS]]
 
[[Category:MC-Basic:Declarations|COMMON SHARED ... AS PLS]]
 
}}
 
}}

Latest revision as of 14:58, 8 October 2018

Language: English  • 中文(简体)‎

Updated 2018-10

This command declares a programmable limit switch (PLS) variable.

The declaration specifies the name of the axis and the output associated with the PLS.

The PLS output may be a digital output (SYSTEM.DOUT.x) or a virtual output (SYSTEM.VOUT.x).

After this command is issued, the PLS exists but is disabled. The PLS property <pls>.PLSENABLE is used to enable the PLS.

After PLS is declared, the following default PLS properties are in effect:

  • The initial output polarity is 0.
  • The repetition interval is 0.
  • The hysteresis is 0.
  • A single PLS position set as 0.

These properties can be set explicitly only when the PLS is disabled.

Syntax

COMMON SHARED <pls> As PLS <axis name> <output> {HWAssistance = 1/0 }

Availability

Version 4.1.11 and later

Type

<pls>: string
<axis name>: string

Range

<axis name>: a valid axis name
<output>: the name of a system output. System outputs are specified by

System.DOut.x, for digital outputs, or
System.VOut.x, for virtual outputs.

<HWAssistance>: 1 activates the PLS high accuracy mode

The value x identifies the specific output to be used. It may be explicitly given or it may be an expression. The expression must evaluate to an integer ranging from 1 to 20 for digital outputs or from 1 to 32 for virtual outputs.

Scope

Configuration or Terminal

In version 4.5.17 and later, the global (common shared) declaration can also be issued from library or task contexts. In those contexts all three parameters of PLS (axis name, system output and HWassistance flag) can be reassigned while reloading the declaring task or library.

Limitations

Write only

PLS high accuracy (HWAssistance) is limited to System.DOut from 1 to 8.

HWAssistance requires Digital Logic Pentium III CPU with Altera version 8.7.1

Examples

Common Shared Pls1 as PLS x_axis SYSTEM.Dout.4

Common Shared Pls2 as PLS x_axis SYS.Dout.8 HWAssistance = 1

Common Shared Pls3 as PLS x_axis SYS.Dout.3 HWAssistance = 0

See Also