Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
en:software:qview:qview_6:qcl_library:vc10copy [2022/05/03 08:52] – created 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 __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 | + | ===== IMPLEMENTATION ===== |
- | All subsequent cases relate to val01 <= val02 and analyze only Val03 | + | **VC10Copy (dir, val01, val02)** |
- | |// | + | Parameters: |
- | |val01 <= // | + | |
- | |// | + | |
- | ===== IMPLEMENTATION ===== | + | ^ IN/ |
+ | | IN | CONST/ | ||
+ | | IN/ | ||
+ | | IN/ | ||
- | **VC10CollVal (val01, val02, val03, Result)** | + | **Direction table** |
- | Parameters: | + | |dir = 1| val**a** -> |
+ | |dir = 0| val**b** -> | ||
+ | === Example === | ||
- | ^IN/ | + | Copy variable A to variable B |
- | | IN | SYSTEM | + | |
- | | IN | SYSTEM | + | <code QCL> |
- | | IN | SYSTEM | + | IF gfCopy |
- | | OUT | SYSTEM | + | gfCopy = 0 |
+ | vala = 1000 | ||
+ | valb = 5000 | ||
+ | dir = 1 | ||
+ | VC10Copy (dir,vala, valb) | ||
+ | ENDIF | ||
+ | |||
+ | </ | ||
=== Example === | === Example === | ||
- | Run the comparison when the " | + | Copy variable B to variable A |
<code QCL> | <code QCL> | ||
- | IF gfComp | + | IF gfCopy |
- | gfComp | + | gfCopy |
- | val01 = 1000 | + | vala = 1000 |
- | val02 = 5000 | + | valb = 5000 |
- | | + | |
+ | VC10Copy | ||
ENDIF | ENDIF | ||
+ | |||
</ | </ | ||
=== Note === | === Note === | ||
- | * The function | + | * This function |