Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
en:software:qview:qview_6:qcl_library:vr10asctoswr [2017/02/07 15:14] – [Esempio] qem103 | en:software:qview:qview_6:qcl_library:vr10asctoswr [2019/08/29 17:01] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== VR10AscToSWr ====== | ||
+ | |||
+ | **V = **// | ||
+ | |||
+ | **R = **//Reading functions// | ||
+ | |||
+ | ASCII ----> SIGNED WORD | ||
+ | |||
+ | The VR10AscToSWr function __converts an Ascii variable type in an signed Word type (word with sign)__. | ||
+ | |||
+ | ===== IMPLEMENTATION ===== | ||
+ | |||
+ | **VR10AscToSWr (array, index, return, errcode)** | ||
+ | |||
+ | Parameters: | ||
+ | |||
+ | ^IN/ | ||
+ | | IN | ARRGBL | ||
+ | | IN | GLOBAL | ||
+ | | OUT | GLOBAL | ||
+ | | OUT | GLOBAL | ||
+ | |||
+ | ==== Errcode ==== | ||
+ | |||
+ | After calling the function, ' | ||
+ | 0: No error\\ | ||
+ | 1: Error: ASCII value is not within 48÷57 or 65÷70 | ||
+ | |||
+ | === Example === | ||
+ | |||
+ | Transforms the Ascii value 005Ah in an signed word value | ||
+ | |||
+ | <code QCL> | ||
+ | index = 1 | ||
+ | array[1] = 48 | ||
+ | array[2] = 48 | ||
+ | array[3] = 53 | ||
+ | array[4] = 65 | ||
+ | |||
+ | VR10AscToSWr (array, index, return, errcode) | ||
+ | |||
+ | ;On the return data you will find : | ||
+ | ; return = 90 | ||
+ | </ | ||
+ | |||
+ | === Note === | ||