Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:software:qview:qview_6:qcl_library:vc10copy [2022/05/03 08:57] qem214en:software:qview:qview_6:qcl_library:vc10copy [2022/05/04 11:45] (current) – [Note] qem214
Line 4: Line 4:
  
 **C = **//Calculation functions// **C = **//Calculation functions//
-The VC10Copy function copy the value from a variable to another. 
  
-All subsequent cases relate to val01 <= val02 and analyze only Val03 +The VC10Copy function copies the content of one variable to another one based on a variable that sets its direction.
- +
-|//**val0**//**3** <   val01|result = 1| +
-|val01 <= //**val03**// < valore2|result = 2| +
-|//**val03**// >= val02|result = 3|+
  
 ===== IMPLEMENTATION ===== ===== IMPLEMENTATION =====
  
-**VC10CollVal (val01, val02, val03, Result)**+**VC10Copy (dir, val01, val02)**
  
 Parameters: Parameters:
  
-^IN/OUT^VARIABLE TYPE^EXAMPLE NAME^DIM^^ +^ IN/OUT   ^ VARIABLE TYPE   ^ EXAMPLE NAME  ^ DIM                                   || 
-|  IN  |  SYSTEM  |  val01  |  L/S  |First value to compare+|  IN      |  CONST/GLOBAL   |  dir          |  F/       | Copy direction variable  | 
-|  IN  |  SYSTEM  |  val02  |  L/S  |Second value to compare+|  IN/OUT   SYSTEM/GLOBAL  |  vala         |  F/B/W/L/S  | First variable           
-|  IN  |  SYSTEM  |  val03  |  L/S  |The value to compare with val01 and val02| +|  IN/OUT   SYSTEM/GLOBAL  |  valb         |  F/B/W/L/S  | Second variable          |
-|  OUT  |  SYSTEM  |  result  |  B  |Variable containing the result of the comparison according to the truth table shown above|+
  
 +**Direction table**
 +
 +|dir = 1| val**a** ->   val**b**| 
 +|dir = 0| val**b** ->   val**a**|
 === Example === === Example ===
  
-Run the comparison when the "gfComp" flag is set to 1.+Copy variable A to variable B
  
 <code QCL> <code QCL>
-IF gfComp +IF gfCopy 
- gfComp = 0 + gfCopy = 0 
- val01 = 1000 + vala = 1000 
- val02 = 5000 + valb = 5000 
-        VC10CollVal (val01, val02val03result)+        dir = 1 
 +        VC10Copy (dir,valavalb)
 ENDIF ENDIF
 +
 </code> </code>
  
-=== Note ===+=== Example ===
  
-  * The function execute a WAIT a time every 180 milliseconds+Copy variable B to variable A 
 + 
 +<code QCL> 
 +IF gfCopy 
 + gfCopy = 0 
 + vala = 1000 
 + valb = 5000 
 +        dir = 0 
 +        VC10Copy (dir,vala, valb) 
 +ENDIF 
 + 
 +</code> 
 + 
 +=== Note ===
  
 +  * This function is usually used, for example, to temporarily copy a value to a supporting variable and then compare it at the end of an operation.
  • Last modified: 2022/05/03 08:57