<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic RS232 Sending Data Format in DASYLab</title>
    <link>https://ni.lithium.com/t5/DASYLab/RS232-Sending-Data-Format/m-p/4423010#M4151</link>
    <description>&lt;P&gt;I have a sensor tester that needs to send a global variable serial number to a pin stamp printer to etch on the part tested.&lt;/P&gt;
&lt;P&gt;The format is very plain: SETVAR SER xxxx[LF].&lt;/P&gt;
&lt;P&gt;If i use the serial monitor and type SETVAR SER 1111\n it changes the serial number to be printed to 1111.&lt;/P&gt;
&lt;P&gt;I haven't had any luck incorporating a global variable in place of the xxxx.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My last attempt was SETVAR SER StrFmt(${SERIAL_NUMBER},4,0)\n that didn't work either.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Everything I have sent, other than the string with numbers, has resulted in the serial number showing 0000 on the pin stamp printer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wish the serial monitor would also show you the characters sent out the RS232 line as well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any ideas how to make this work?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DASYLab 16.0 Full&lt;/P&gt;
&lt;P&gt;Windows 11 Pro&lt;/P&gt;</description>
    <pubDate>Thu, 06 Feb 2025 19:36:27 GMT</pubDate>
    <dc:creator>JimWalters</dc:creator>
    <dc:date>2025-02-06T19:36:27Z</dc:date>
    <item>
      <title>RS232 Sending Data Format</title>
      <link>https://ni.lithium.com/t5/DASYLab/RS232-Sending-Data-Format/m-p/4423010#M4151</link>
      <description>&lt;P&gt;I have a sensor tester that needs to send a global variable serial number to a pin stamp printer to etch on the part tested.&lt;/P&gt;
&lt;P&gt;The format is very plain: SETVAR SER xxxx[LF].&lt;/P&gt;
&lt;P&gt;If i use the serial monitor and type SETVAR SER 1111\n it changes the serial number to be printed to 1111.&lt;/P&gt;
&lt;P&gt;I haven't had any luck incorporating a global variable in place of the xxxx.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My last attempt was SETVAR SER StrFmt(${SERIAL_NUMBER},4,0)\n that didn't work either.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Everything I have sent, other than the string with numbers, has resulted in the serial number showing 0000 on the pin stamp printer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I wish the serial monitor would also show you the characters sent out the RS232 line as well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any ideas how to make this work?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DASYLab 16.0 Full&lt;/P&gt;
&lt;P&gt;Windows 11 Pro&lt;/P&gt;</description>
      <pubDate>Thu, 06 Feb 2025 19:36:27 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/DASYLab/RS232-Sending-Data-Format/m-p/4423010#M4151</guid>
      <dc:creator>JimWalters</dc:creator>
      <dc:date>2025-02-06T19:36:27Z</dc:date>
    </item>
    <item>
      <title>Re: RS232 Sending Data Format</title>
      <link>https://ni.lithium.com/t5/DASYLab/RS232-Sending-Data-Format/m-p/4423024#M4152</link>
      <description>&lt;P&gt;I'm unsure what generates the serial number, but if it's stored in a global variable (${VAR_1}), you can format a global string as follows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"SETVAR SER" + strfmt(${VAR_1}, 4, 0)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This should produce "SETVAR SER1111"&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use the RS232 Output set for Single Commands. Set the format to [a]\n to send a line feed and use an Action module to send the global string.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Feb 2025 21:06:29 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/DASYLab/RS232-Sending-Data-Format/m-p/4423024#M4152</guid>
      <dc:creator>john@MCC</dc:creator>
      <dc:date>2025-02-06T21:06:29Z</dc:date>
    </item>
    <item>
      <title>Re: RS232 Sending Data Format</title>
      <link>https://ni.lithium.com/t5/DASYLab/RS232-Sending-Data-Format/m-p/4424322#M4153</link>
      <description>&lt;P&gt;I have worked with serial communications since the 80's.&lt;/P&gt;
&lt;P&gt;As a newbie to DASYLab, the answer wasn't working at first, but I finally figured out I had to put the solution into the string calculation box instead of directly into the variable string.&lt;/P&gt;
&lt;P&gt;I needed to see what data was going across the serial line, but didn't have the inline capture setup I had at previous jobs.&amp;nbsp; Adding to the issue was having to use a USB to Serial converter.&lt;/P&gt;
&lt;P&gt;I found a USBPcap interface for WireShark that allowed me to see what was going across the USB interface to the Serial Converter.&amp;nbsp; Once I was able to see the data, it was pretty simple to troubleshoot.&lt;/P&gt;
&lt;P&gt;I really appreciate the assistance!&lt;/P&gt;</description>
      <pubDate>Fri, 14 Feb 2025 13:35:24 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/DASYLab/RS232-Sending-Data-Format/m-p/4424322#M4153</guid>
      <dc:creator>JimWalters</dc:creator>
      <dc:date>2025-02-14T13:35:24Z</dc:date>
    </item>
  </channel>
</rss>

