Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| en:software:qview:qview_6:qcl_library:vc10copy [2022/05/03 09:16] – [Example] qem214 | en:software:qview:qview_6:qcl_library:vc10copy [2022/05/04 11:45] (current) – [Note] qem214 | ||
|---|---|---|---|
| Line 4: | Line 4: | ||
| **C = **// | **C = **// | ||
| - | 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/ | + | ^ IN/ |
| - | | IN | GLOBAL | + | | IN | |
| - | | IN | SYSTEM | + | | IN/OUT |
| - | | IN | SYSTEM | + | | IN/OUT |
| + | **Direction table** | ||
| + | |dir = 1| val**a** -> | ||
| + | |dir = 0| val**b** -> | ||
| === Example === | === Example === | ||
| - | Run the copy when the " | + | 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 | ||
| + | |||
| </ | </ | ||
| - | === 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 | ||
| + | |||
| + | </ | ||
| + | |||
| + | === 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. | ||