Doc. # 1-0003191
Date Updated 04-22-2004 Date Created 07-27-2000
Document Type Knowledge Base Related OS
Related Product GeniDAQ
How to add CR and LF in USER Program block into RS-232 block of Genie/VisiDAQ/GeniDAQ?
Solution:
There is one way to add CR and LF in USER PROGRAM block, you can use "sprintf()" in USER PROGRAM to add "CR" and "LF" with string. The "CR" is typed as "\r" and "LF" is typed as "\n" in sprintf(). For example, if you type "sprintf(a1,"test %s \n","test);" in USER PROGRAM block. Then a1 will be "test test" comes with an "LF". When you connect USER PROGRAM block with RS-232 block, the output of USER PROGRAM block will be feed into prompt string of RS-232 block automatically.