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 09:16] – [Note] 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 copies the value from a variable to another. 
  
 +The VC10Copy function copies the content of one variable to another one based on a variable that sets its direction.
  
 ===== IMPLEMENTATION ===== ===== IMPLEMENTATION =====
  
-**VC10Copy (val01, val02)**+**VC10Copy (dir, val01, val02)**
  
 Parameters: Parameters:
  
-^IN/OUT^VARIABLE TYPE^EXAMPLE NAME^DIM^^ +^ IN/OUT   ^ VARIABLE TYPE   ^ EXAMPLE NAME  ^ DIM                                   || 
-|  IN  |  GLOBAL  |  dir  |  F  |Activation variable| +|  IN      |  CONST/GLOBAL   |  dir          |  F/L        Copy direction variable  
-|  IN  |  SYSTEM  |  vala  |  F  |First variable| +|  IN/OUT   SYSTEM/GLOBAL   vala         |  F/B/W/L/ | First variable           
-|  IN  |  SYSTEM  |  valb  |  F  |Second variable|+|  IN/OUT   SYSTEM/GLOBAL   valb         |  F/B/W/L/ | Second variable          |
  
 +**Direction table**
  
 +|dir = 1| val**a** ->   val**b**| 
 +|dir = 0| val**b** ->   val**a**|
 === Example === === Example ===
  
-Run the copy when the "gfCopy" flag is set to 1.+Copy variable A to variable B
  
 <code QCL> <code QCL>
Line 28: Line 31:
  vala = 1000  vala = 1000
  valb = 5000  valb = 5000
 +        dir = 1
         VC10Copy (dir,vala, valb)         VC10Copy (dir,vala, valb)
 ENDIF ENDIF
 +
 +</code>
 +
 +=== Example ===
 +
 +Copy variable B to variable A
 +
 +<code QCL>
 +IF gfCopy
 + gfCopy = 0
 + vala = 1000
 + valb = 5000
 +        dir = 0
 +        VC10Copy (dir,vala, valb)
 +ENDIF
 +
 </code> </code>
  
 === Note === === Note ===
  
-  * The function +  * 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 09:16