Differences

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

Link to this comparison view

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