{"id":316,"date":"2018-09-26T17:39:24","date_gmt":"2018-09-26T15:39:24","guid":{"rendered":"https:\/\/www.smartlux.com\/sdl\/?p=316"},"modified":"2019-05-21T18:09:06","modified_gmt":"2019-05-21T16:09:06","slug":"combine-multiple-lines-into-one-row","status":"publish","type":"post","link":"https:\/\/www.smartlux.com\/sdl\/combine-multiple-lines-into-one-row\/","title":{"rendered":"Version 0.9.0 &#8211; combine multiple lines into one row"},"content":{"rendered":"<p>With the new features in version 0.9.0, Simple Data Logger takes a big step towards the release of version 1.0 (planned for next Monday).<\/p>\n<h2>Combine multiple lines into one row<\/h2>\n<p>This is best explained with an example: We&#8217;re using a counting scale and it sends the (net) weight, count and average piece weight to the PC (each in a separate line):<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-317\" src=\"https:\/\/www.smartlux.com\/sdl\/wp-content\/uploads\/sites\/3\/2018\/09\/combine-received-lines.png\" alt=\"Multiple lines received from counting scale\" width=\"547\" height=\"664\" srcset=\"https:\/\/www.smartlux.com\/sdl\/wp-content\/uploads\/sites\/3\/2018\/09\/combine-received-lines.png 547w, https:\/\/www.smartlux.com\/sdl\/wp-content\/uploads\/sites\/3\/2018\/09\/combine-received-lines-247x300.png 247w\" sizes=\"auto, (max-width: 547px) 100vw, 547px\" \/><\/p>\n<p>While we want to capture all of these values, we do not want them to appear in individual lines (rows) in our CSV file. Instead, these three values should be written into one row (as three columns).<\/p>\n<p>This is now possible with Simple Data Logger by using the <strong>Combine<\/strong> setting in the <strong>Process<\/strong> tab:<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-319\" src=\"https:\/\/www.smartlux.com\/sdl\/wp-content\/uploads\/sites\/3\/2018\/09\/process-tab.png\" alt=\"Process tab\" width=\"547\" height=\"664\" srcset=\"https:\/\/www.smartlux.com\/sdl\/wp-content\/uploads\/sites\/3\/2018\/09\/process-tab.png 547w, https:\/\/www.smartlux.com\/sdl\/wp-content\/uploads\/sites\/3\/2018\/09\/process-tab-247x300.png 247w\" sizes=\"auto, (max-width: 547px) 100vw, 547px\" \/><\/p>\n<p>The result is one row containing three values:<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-318\" src=\"https:\/\/www.smartlux.com\/sdl\/wp-content\/uploads\/sites\/3\/2018\/09\/3-lines-combined.png\" alt=\"3 lines combined into one row\" width=\"566\" height=\"59\" srcset=\"https:\/\/www.smartlux.com\/sdl\/wp-content\/uploads\/sites\/3\/2018\/09\/3-lines-combined.png 566w, https:\/\/www.smartlux.com\/sdl\/wp-content\/uploads\/sites\/3\/2018\/09\/3-lines-combined-300x31.png 300w\" sizes=\"auto, (max-width: 566px) 100vw, 566px\" \/><br \/>\nWithout this setting, the values would have been written into three separate rows:<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-320\" src=\"https:\/\/www.smartlux.com\/sdl\/wp-content\/uploads\/sites\/3\/2018\/09\/3-lines-separate.png\" alt=\"3 separate rows\" width=\"363\" height=\"101\" srcset=\"https:\/\/www.smartlux.com\/sdl\/wp-content\/uploads\/sites\/3\/2018\/09\/3-lines-separate.png 363w, https:\/\/www.smartlux.com\/sdl\/wp-content\/uploads\/sites\/3\/2018\/09\/3-lines-separate-300x83.png 300w\" sizes=\"auto, (max-width: 363px) 100vw, 363px\" \/><\/p>\n<h2>Ignore &#8220;empty&#8221; lines<\/h2>\n<p>In the example above, you may have noticed that the counting scale sent a fourth line containing only the carriage return and line feed characters. By selecting &#8220;Ignore received lines consisting only of <a href=\"https:\/\/docs.microsoft.com\/en-us\/dotnet\/api\/system.char.iswhitespace?view=netframework-4.7.2\">white-space characters<\/a>&#8220;, we don&#8217;t have to consider this row when setting the desired number of columns.<\/p>\n<p class=\"note\">This settings also affects synchronized <a href=\"https:\/\/www.smartlux.com\/sdl\/documentation\/#polling\">polling<\/a> with a delay: &#8220;empty&#8221; lines are not considered to be an answer from the device and do not prompt SDL to repeat the polling command.<\/p>\n<h2>Show sent data in the event log<\/h2>\n<p>Until now, only data received form the connected device was shown in the event log even though SDL already had the ability to send commands. This sent data is now shown in <span style=\"color: #339966;\">green<\/span> (the screenshot also shows the reply from the scale and the <span style=\"color: #3366ff;\">captured weight value<\/span>):<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-321\" src=\"https:\/\/www.smartlux.com\/sdl\/wp-content\/uploads\/sites\/3\/2018\/09\/event-log-with-sent-data.png\" alt=\"Event log with sent data\" width=\"535\" height=\"652\" srcset=\"https:\/\/www.smartlux.com\/sdl\/wp-content\/uploads\/sites\/3\/2018\/09\/event-log-with-sent-data.png 535w, https:\/\/www.smartlux.com\/sdl\/wp-content\/uploads\/sites\/3\/2018\/09\/event-log-with-sent-data-246x300.png 246w\" sizes=\"auto, (max-width: 535px) 100vw, 535px\" \/>You can change this behavior in the <strong>Settings<\/strong> tab:<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-322\" src=\"https:\/\/www.smartlux.com\/sdl\/wp-content\/uploads\/sites\/3\/2018\/09\/settings-with-sent-data.png\" alt=\"Settings tab\" width=\"547\" height=\"664\" srcset=\"https:\/\/www.smartlux.com\/sdl\/wp-content\/uploads\/sites\/3\/2018\/09\/settings-with-sent-data.png 547w, https:\/\/www.smartlux.com\/sdl\/wp-content\/uploads\/sites\/3\/2018\/09\/settings-with-sent-data-247x300.png 247w\" sizes=\"auto, (max-width: 547px) 100vw, 547px\" \/><\/p>\n<h2>Line numbers and custom comments<\/h2>\n<p>SDL can add line numbers as well as a custom comment (e.g. the project or sample name) to each row. You&#8217;ll find these settings in the <strong>File<\/strong> tab:<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-323\" src=\"https:\/\/www.smartlux.com\/sdl\/wp-content\/uploads\/sites\/3\/2018\/09\/add-additional-information.jpg\" alt=\"Add additional information\" width=\"547\" height=\"664\" srcset=\"https:\/\/www.smartlux.com\/sdl\/wp-content\/uploads\/sites\/3\/2018\/09\/add-additional-information.jpg 547w, https:\/\/www.smartlux.com\/sdl\/wp-content\/uploads\/sites\/3\/2018\/09\/add-additional-information-247x300.jpg 247w\" sizes=\"auto, (max-width: 547px) 100vw, 547px\" \/>Result:<br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-324\" src=\"https:\/\/www.smartlux.com\/sdl\/wp-content\/uploads\/sites\/3\/2018\/09\/line-numbers-and-comment.png\" alt=\"Line numbers and comment\" width=\"567\" height=\"142\" srcset=\"https:\/\/www.smartlux.com\/sdl\/wp-content\/uploads\/sites\/3\/2018\/09\/line-numbers-and-comment.png 567w, https:\/\/www.smartlux.com\/sdl\/wp-content\/uploads\/sites\/3\/2018\/09\/line-numbers-and-comment-300x75.png 300w\" sizes=\"auto, (max-width: 567px) 100vw, 567px\" \/><\/p>\n<h2>Bug fixes and UI improvements<\/h2>\n<p>We&#8217;ve fixed a bug which caused SDL to stop data collection when a number conversion error occurred. The error is now logged, but SDL does not stop.<\/p>\n<p>We&#8217;ve also harmonized the positioning and margins of the user interface elements to make SDL easier and more pleasant to use.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>With the new features in version 0.9.0, Simple Data Logger takes a big step towards the release of version 1.0:<br \/>\n&#8211; Combine multiple lines into one row<br \/>\n&#8211; Ignore &#8220;empty&#8221; lines<br \/>\n&#8211; Show sent data (commands) in the event log<br \/>\n&#8211; Line numbers and custom comments<br \/>\n&#8211; Bug fixes and UI improvements<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_seopress_titles_title":"Simple Data Logger 0.9.0: combine multiple lines into one row","_seopress_titles_desc":"Simple Data Logger takes a big step towards the release of version 1.0: Combine multiple lines into one row, ignore &quot;empty&quot; lines, show sent commands in the event log, add line numbers and custom comments.","_seopress_robots_index":"","_seopress_robots_follow":"","_seopress_robots_imageindex":"","_seopress_robots_snippet":"","_seopress_robots_primary_cat":"none","_seopress_robots_breadcrumbs":"","_seopress_robots_freeze_modified_date":"","_seopress_robots_custom_modified_date":"","_seopress_robots_canonical":"","_seopress_social_fb_title":"","_seopress_social_fb_desc":"","_seopress_social_fb_img":"","_seopress_social_fb_img_attachment_id":0,"_seopress_social_fb_img_width":0,"_seopress_social_fb_img_height":0,"_seopress_social_twitter_title":"","_seopress_social_twitter_desc":"","_seopress_social_twitter_img":"","_seopress_social_twitter_img_attachment_id":0,"_seopress_social_twitter_img_width":0,"_seopress_social_twitter_img_height":0,"_seopress_redirections_value":"","_seopress_redirections_enabled":"","_seopress_redirections_enabled_regex":"","_seopress_redirections_logged_status":"","_seopress_redirections_param":"","_seopress_redirections_type":301,"_seopress_analysis_target_kw":"","_seopress_news_disabled":"","_seopress_video_disabled":"","_seopress_video":[{"url":"","title":"","desc":"","thumbnail":"","duration":"","rating":"","view_count":"","tag":"","cat":""}],"_seopress_pro_schemas_manual":[],"_seopress_pro_rich_snippets_disable_all":"","_seopress_pro_rich_snippets_disable":[],"_seopress_pro_schemas":[],"footnotes":""},"categories":[13],"tags":[29,30,26,31,28,32],"class_list":["post-316","post","type-post","status-publish","format-standard","hentry","category-changelog","tag-columns","tag-counting-scale","tag-csv","tag-line-numbers","tag-lines","tag-rows"],"_links":{"self":[{"href":"https:\/\/www.smartlux.com\/sdl\/wp-json\/wp\/v2\/posts\/316","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.smartlux.com\/sdl\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.smartlux.com\/sdl\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.smartlux.com\/sdl\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.smartlux.com\/sdl\/wp-json\/wp\/v2\/comments?post=316"}],"version-history":[{"count":1,"href":"https:\/\/www.smartlux.com\/sdl\/wp-json\/wp\/v2\/posts\/316\/revisions"}],"predecessor-version":[{"id":325,"href":"https:\/\/www.smartlux.com\/sdl\/wp-json\/wp\/v2\/posts\/316\/revisions\/325"}],"wp:attachment":[{"href":"https:\/\/www.smartlux.com\/sdl\/wp-json\/wp\/v2\/media?parent=316"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.smartlux.com\/sdl\/wp-json\/wp\/v2\/categories?post=316"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.smartlux.com\/sdl\/wp-json\/wp\/v2\/tags?post=316"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}