In SX Microcontrollers, SX/B Compiler and SX-Key Tool, lboucher wrote: Ahh i got it Define the sub function with two variables. 1 being string length 1 being string reference number so TX_DATA_BYTE 1 7 (where 1 is string reference, and 7 is length. then the sub funtion SUB TX_DATA_BYTE for idx = 0 to __PARAM2 if __PARAM1 = 1 then send_byte=monitor_log(idx) endif if __PARAM1 = 2 then send_byte=some_other_string(idx) endif SEROUT tx_data, DATA_BAUD_RATE, send_byte ' send the character next ENDSUB ---------- End of Message ---------- You can view the post on-line at: http://forums.parallax.com/forums/default.aspx?f=7&p=1&m=359392#m360319 Need assistance? Send an email to the Forum Administrator at forumadmin@parallax.com The Parallax Forums are powered by dotNetBB Forums, copyright 2002-2009 (http://www.dotNetBB.com)