{"id":23569,"date":"2024-05-15T16:52:19","date_gmt":"2024-05-15T14:52:19","guid":{"rendered":"https:\/\/blog.darwin-microfluidics.com\/?p=23569"},"modified":"2026-11-19T15:24:59","modified_gmt":"2026-11-19T14:24:59","slug":"how-to-control-the-lspone-via-python-and-matlab","status":"publish","type":"post","link":"https:\/\/blog.darwin-microfluidics.com\/how-to-control-the-lspone-via-python-and-matlab\/","title":{"rendered":"How to control the LSPone via Python and Matlab ?"},"content":{"rendered":"<div data-elementor-type=\"wp-post\" data-elementor-id=\"23569\" class=\"elementor elementor-23569\" data-elementor-post-type=\"post\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-e8572f2 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"e8572f2\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-5d6a56d\" data-id=\"5d6a56d\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-0e4e1d7 elementor-widget elementor-widget-text-editor\" data-id=\"0e4e1d7\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><strong>Syringe pumps<\/strong> serve as indispensable tools for accurately delivering liquid volumes. Among these, the <a href=\"https:\/\/darwin-microfluidics.com\/products\/lspone-laboratory-sequential-microdispenser\"><strong>LSPone<\/strong><\/a> stands out in the world of laboratory automation for its exceptional performance and versatility.<\/p><p>In this blog post, we&rsquo;ll explore how to control the LSPone syringe pump using Python and Matlab. From understanding its capabilities to providing simple step-by-step instructions for setting up communication interfaces and controlling the pump, this post aims to empower researchers of all levels. Whether you&rsquo;re working on pump control for the very first time or seeking advanced techniques, this guide will empower you in mastering your LSPone syringe pump.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-450b73f elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"450b73f\" data-element_type=\"section\" data-e-type=\"section\" data-settings='{\"background_background\":\"classic\"}'>\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-004c0cd\" data-id=\"004c0cd\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-152e06a elementor-toc--content-ellipsis elementor-toc--minimized-on-tablet elementor-widget elementor-widget-table-of-contents\" data-id=\"152e06a\" data-element_type=\"widget\" data-e-type=\"widget\" data-settings='{\"exclude_headings_by_selector\":\"#cta, #cta2\",\"headings_by_tags\":[\"h2\",\"h3\"],\"marker_view\":\"numbers\",\"no_headings_message\":\"No headings were found on this page.\",\"minimize_box\":\"yes\",\"minimized_on\":\"tablet\",\"hierarchical_view\":\"yes\",\"min_height\":{\"unit\":\"px\",\"size\":\"\",\"sizes\":[]},\"min_height_tablet\":{\"unit\":\"px\",\"size\":\"\",\"sizes\":[]},\"min_height_mobile\":{\"unit\":\"px\",\"size\":\"\",\"sizes\":[]}}' data-widget_type=\"table-of-contents.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div class=\"elementor-toc__header\">\n\t\t\t\t\t\t<h4 class=\"elementor-toc__header-title\">\n\t\t\t\tTABLE OF CONTENTS\t\t\t<\/h4>\n\t\t\t\t\t\t\t\t\t\t<div class=\"elementor-toc__toggle-button elementor-toc__toggle-button--expand\" role=\"button\" tabindex=\"0\" aria-controls=\"elementor-toc__152e06a\" aria-expanded=\"true\" aria-label=\"Open table of contents\"><i aria-hidden=\"true\" class=\"fas fa-chevron-down\"><\/i><\/div>\n\t\t\t\t<div class=\"elementor-toc__toggle-button elementor-toc__toggle-button--collapse\" role=\"button\" tabindex=\"0\" aria-controls=\"elementor-toc__152e06a\" aria-expanded=\"true\" aria-label=\"Close table of contents\"><i aria-hidden=\"true\" class=\"fas fa-chevron-up\"><\/i><\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<div id=\"elementor-toc__152e06a\" class=\"elementor-toc__body\">\n\t\t\t<div class=\"elementor-toc__spinner-container\">\n\t\t\t\t<i class=\"elementor-toc__spinner eicon-animation-spin eicon-loading\" aria-hidden=\"true\"><\/i>\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-147e369 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"147e369\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-11130fd\" data-id=\"11130fd\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-f811a3d elementor-widget elementor-widget-heading\" data-id=\"f811a3d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Why Choose the LSPone Laboratory Syringe Pump?<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-b8905b7 elementor-widget elementor-widget-text-editor\" data-id=\"b8905b7\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>The <a href=\"https:\/\/darwin-microfluidics.com\/products\/lspone-laboratory-sequential-microdispenser\">LSPone Laboratory Syringe Pump<\/a> from <a href=\"https:\/\/amf.ch\/\" target=\"_blank\" rel=\"noopener\">Advanced Microfluidics SA<\/a> is an innovative solution for high-precision dosing in microfluidic research combining high-precision pumping with a low-volume rotary valve. Coupled with the LSPoneQuick software, it can aspirate or dispense liquids, control the flow rate and automate fluid handling.<\/p><p>The LSPone stands out for its exceptional dosing accuracy and near-pulseless flow, catering to diverse liquid handling needs ranging from milliliters to nanoliters. Its zero dead volume selection valve facilitates efficient management of multiple fluids with minimal carryover, while the user-friendly interface ensures effortless operation making the LSPone a perfect choice for laboratory experiments.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-03da53b elementor-widget elementor-widget-global elementor-global-18564 elementor-widget-pix-promo-box\" data-id=\"03da53b\" data-element_type=\"widget\" data-e-type=\"widget\" id=\"cta\" data-widget_type=\"pix-promo-box.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"pix-promo-box card w-100 h-1002 bg-heading-default  pix-hover-item rounded-10 position-relative overflow-hidden text-white   text-left w-100 d-block\"><img decoding=\"async\" src=\"https:\/\/blog.darwin-microfluidics.com\/wp-content\/uploads\/2024\/02\/image-WTTJ-coline-et-lise-au-labo-Transformed-1.jpg\" class=\"card-img pix-bg-image pix-img-scale h-100 rounded-10 pix-opacity-4 pix-hover-opacity-4\" alt=\"READY TO TAKE YOUR RESEARCH TO THE NEXT LEVEL?\"\/><a href=\"https:\/\/darwin-microfluidics.com\/\" class=\"card-img-overlay2 d-inline-block w-100 pix-img-overlay pix-p-20 d-flex align-items-end\" style=\"min-height:300px;\"><div class=\"w-100\"><div class=\"\"><span class=\"pix-badge-element d-inline-block mr-1 \"><span class=\"badge font-weight-bold bg-primary  \" style=\"font-size:22px; \"><span class=\"text-white\" style=\"\">Visit our shop!<\/span><\/span><\/span><\/div><h2 class=\"card-title font-weight-bold text-white pix-my-10\" style=\"\">READY TO TAKE YOUR RESEARCH TO THE NEXT LEVEL?<\/h2><span class=\"d-flex align-items-center font-weight-bold text-light-opacity-6 text-20\"><span>Discover the latest products and solutions!<\/span><i class=\"pixicon-angle-right pix-hover-right pix-hover-item pix-ml-10 font-weight-bold text-20\"><\/i><\/span><\/div><\/a><\/div>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-0d051cd elementor-widget elementor-widget-text-editor\" data-id=\"0d051cd\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><\/p><p>Key advantages of the LSPone include its exceptional dead, internal, and carryover volumes that further underscore its superiority. With no dead volume, a carryover volume limited to 1.5 &mu;L and an internal volume of only 4 &mu;L reduced by the small channel diameter of 0.5 mm, this syringe pump offers unmatched precision and control allowing fast liquid switches.<\/p>\n<p>Moreover, the LSPone&rsquo;s optimized flow paths, which not only limit contamination but also maximize cleanability, ensure impeccable biochemical compatibility. Its high dilution ratio, facilitated by minimal carryover volume, ensures maximal dilution with the diluent, while its unique valve design expels air from the syringe and valve immediately allowing for bubble-free priming.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-234ff1b elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"234ff1b\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-2d3dac9\" data-id=\"2d3dac9\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-61e6acd elementor-widget elementor-widget-heading\" data-id=\"61e6acd\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">What Do you Need to Communicate with the LSPone?<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-633d65e elementor-widget elementor-widget-text-editor\" data-id=\"633d65e\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>To communicate with the LSPone laboratory syringe pump you will need a few key components:<\/p><ul><li>An <a href=\"https:\/\/darwin-microfluidics.com\/products\/lspone-laboratory-sequential-microdispenser\">LSPone laboratory syringe pump<\/a> with a <a href=\"https:\/\/darwin-microfluidics.com\/products\/glass-syringes-for-lspone-spm-microdispensers\">syringe<\/a> of your choice,<\/li><li>A mini-USB\/USB cable or a DB9 connector (RS-232 or RS-485 can be implemented within it) allowing for serial communication and enabling data transfer between the syringe pump and the computer,<\/li><li>A Serial Port: The computer must have an available serial port or a USB-to-serial adapter to connect the cable<\/li><li>The LSPoneQuick software or a programming platform (Matlab or Python Environment with the <a href=\"https:\/\/pypi.org\/project\/pyserial\/\" target=\"_blank\" rel=\"noopener\">PySerial<\/a> package that encapsulates access to the serial port),<\/li><li>A basic understanding of the <a href=\"#command\">LSPone command set<\/a> detailed in the pump&rsquo;s <a href=\"https:\/\/darwin-microfluidics.com\/content\/pdfs\/2019-05-04_LSPone_OperatingManuel.pdf\" target=\"_blank\" rel=\"noopener\">user manual<\/a>.<\/li><\/ul>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-743813a elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"743813a\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-33ea3f0\" data-id=\"33ea3f0\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-6473d44 elementor-widget elementor-widget-heading\" data-id=\"6473d44\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">How to Set Up the Communication Port?<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-e4bf705 elementor-widget elementor-widget-text-editor\" data-id=\"e4bf705\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Before you can start controlling your LSPone pump, it&rsquo;s essential to configure the communication port. Follow these steps to establish a connection <span style=\"letter-spacing: -0.16px; color: var( --e-global-color-text ); font-family: var( --e-global-typography-text-font-family ), Sans-serif; font-weight: var( --e-global-typography-text-font-weight ); font-size: 1rem;\">&#128295;<\/span><span style=\"color: inherit; font-family: var( --e-global-typography-text-font-family ), Sans-serif; font-weight: var( --e-global-typography-text-font-weight ); font-size: 1rem; letter-spacing: -0.01rem;\">:<\/span><\/p><ul><li>Connect the mini-USB\/USB cable or DB9 connector to the serial port on the rear of the pump and the corresponding port on the computer.<\/li><li>Turn on the pump.<\/li><li>Identify the serial port name assigned to the connection on your computer (e.g., COM4 for Windows or \/dev\/ttyUSB0 for Linux). You can typically find this information in the device manager or by using terminal coammands.<\/li><li>Ensure that the serial port settings match the specifications of your syringe pump:<ul><li>1 start bit,<\/li><li>8 data bits,<\/li><li>Parity: none,<\/li><li>1 stop bit,<\/li><li>a baud rate of 9600 bits\/s.<\/li><\/ul><\/li><\/ul><ul><li>Test the connection by sending a simple command, such as querying the pump status.<\/li><\/ul>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-6d2e508 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"6d2e508\" data-element_type=\"section\" data-e-type=\"section\" id=\"command\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-7f39a49\" data-id=\"7f39a49\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-8ac919e elementor-widget elementor-widget-heading\" data-id=\"8ac919e\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">The LSPone Command Set<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-05461c1 elementor-widget elementor-widget-text-editor\" data-id=\"05461c1\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>The LSPone offers an array of commands for external control, categorized into distinct types for precise manipulation. These include control directives, initialization prompts, valve adjustments, plunger movements, setting configurations, and comprehensive reporting functionalities. Each command, excluding queries and special directives starting with &quot;?&quot; or &quot;!&quot;, necessitates the appended marker [R] for execution.<\/p><p>Notably, once a command is initiated, the system does not accept new commands except for interruptions or report requests. Additionally, the system promptly responds to command inputs and notifies of errors in case of invalid entries within the command sequence.<\/p><p>The LSPone Command Set used to control the LSPone syringe pump is summarized in the <a href=\"#table\">table<\/a> below. More commands are detailed in the pump&rsquo;s <a href=\"https:\/\/darwin-microfluidics.com\/content\/pdfs\/2019-05-04_LSPone_OperatingManuel.pdf\" target=\"_blank\" rel=\"noopener\">user manual<\/a>.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-2188a35 elementor-widget elementor-widget-shortcode\" data-id=\"2188a35\" data-element_type=\"widget\" data-e-type=\"widget\" id=\"table\" data-widget_type=\"shortcode.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-shortcode\">\n<table id=\"tablepress-31\" class=\"tablepress tablepress-id-31\">\n<thead>\n<tr class=\"row-1\">\n\t<th class=\"column-1\">Command<\/th><th class=\"column-2\">Operand<\/th><th class=\"column-3\">Operand Description<\/th><th class=\"column-4\">Command Description<\/th>\n<\/tr>\n<\/thead>\n<tbody class=\"row-striping row-hover\">\n<tr class=\"row-2\">\n\t<td class=\"column-1\">R<\/td><td class=\"column-2\">N\/A<\/td><td class=\"column-3\"><\/td><td class=\"column-4\">Execute command string<\/td>\n<\/tr>\n<tr class=\"row-3\">\n\t<td class=\"column-1\">X<\/td><td class=\"column-2\">N\/A<\/td><td class=\"column-3\">No trailing [R]<\/td><td class=\"column-4\">Re-execute last executed command string<\/td>\n<\/tr>\n<tr class=\"row-4\">\n\t<td class=\"column-1\">G&lt;n&gt;<\/td><td class=\"column-2\">0-60000<\/td><td class=\"column-3\">0 = Loop forever<\/td><td class=\"column-4\">Repeat command sequence<\/td>\n<\/tr>\n<tr class=\"row-5\">\n\t<td class=\"column-1\">g<\/td><td class=\"column-2\">N\/A<\/td><td class=\"column-3\">Max loop depth = 10<\/td><td class=\"column-4\">Mark the start of a repeat sequence<\/td>\n<\/tr>\n<tr class=\"row-6\">\n\t<td class=\"column-1\">M&lt;n&gt;<\/td><td class=\"column-2\">0-86400000<\/td><td class=\"column-3\">Milliseconds<\/td><td class=\"column-4\">Delay command execution<\/td>\n<\/tr>\n<tr class=\"row-7\">\n\t<td class=\"column-1\">H<\/td><td class=\"column-2\">N\/A<\/td><td class=\"column-3\">No trailing [R]<\/td><td class=\"column-4\">Halt command<\/td>\n<\/tr>\n<tr class=\"row-8\">\n\t<td class=\"column-1\">@POWEROFF<\/td><td class=\"column-2\">N\/A<\/td><td class=\"column-3\"><\/td><td class=\"column-4\">Shut down the pump<\/td>\n<\/tr>\n<tr class=\"row-9\">\n\t<td class=\"column-1\">Z&lt;n&gt; or Y&lt;n&gt;<\/td><td class=\"column-2\">(void) or 0-3<\/td><td class=\"column-3\">(void) or 0 = high force, 1 = normal force, 2 = medium force, 3 = low force<\/td><td class=\"column-4\">Initialize the plunger drive and home the valve<\/td>\n<\/tr>\n<tr class=\"row-10\">\n\t<td class=\"column-1\">O&lt;n&gt;<\/td><td class=\"column-2\">1-max nb of valve positions (4, 6, 8, 10 or 12)<\/td><td class=\"column-3\">Counter-clockwise plug movement (valve seen from above)<\/td><td class=\"column-4\">Move to valve port<\/td>\n<\/tr>\n<tr class=\"row-11\">\n\t<td class=\"column-1\">I&lt;n&gt;<\/td><td class=\"column-2\">1-max nb of valve positions (4, 6, 8, 10 or 12)<\/td><td class=\"column-3\">Clockwise plug movement (valve seen from above)<\/td><td class=\"column-4\">Move to valve port<\/td>\n<\/tr>\n<tr class=\"row-12\">\n\t<td class=\"column-1\">B&lt;n&gt;<\/td><td class=\"column-2\">1-max nb of valve positions (4, 6, 8, 10 or 12)<\/td><td class=\"column-3\">Shortest plug movement (clockwise direction preferred)<\/td><td class=\"column-4\">Move to valve port<\/td>\n<\/tr>\n<tr class=\"row-13\">\n\t<td class=\"column-1\">A&lt;n&gt;<\/td><td class=\"column-2\">0-3000 with N=0<br>\n0-24000 with N=1<\/td><td class=\"column-3\"><\/td><td class=\"column-4\">Absolute position<\/td>\n<\/tr>\n<tr class=\"row-14\">\n\t<td class=\"column-1\">P&lt;n&gt;<\/td><td class=\"column-2\">0-3000 with N=0<br>\r\n0-24000 with N=1<\/td><td class=\"column-3\"><\/td><td class=\"column-4\">Relative Pickup<\/td>\n<\/tr>\n<tr class=\"row-15\">\n\t<td class=\"column-1\">D&lt;n&gt;<\/td><td class=\"column-2\">0-3000 with N=0<br>\r\n0-24000 with N=1<\/td><td class=\"column-3\"><\/td><td class=\"column-4\">Relative Dispense<\/td>\n<\/tr>\n<tr class=\"row-16\">\n\t<td class=\"column-1\">V&lt;n&gt;<\/td><td class=\"column-2\">1-1600<\/td><td class=\"column-3\">Peak speed (pulses\/sec)<\/td><td class=\"column-4\">Set peak speed<\/td>\n<\/tr>\n<tr class=\"row-17\">\n\t<td class=\"column-1\">N&lt;n&gt;<\/td><td class=\"column-2\">0-1<\/td><td class=\"column-3\">&lt;0&gt; = microstep of 0.01 mm resolution<br>\n&lt;1&gt; = microstep of 0.00125 mm resolution<\/td><td class=\"column-4\">Scaling of dispense\/pickup. Motor always driven in microstep mode<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<!-- #tablepress-31 from cache --><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-cd2cff0 elementor-widget elementor-widget-text-editor\" data-id=\"cd2cff0\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Some report commands are presented in the <a href=\"#table2\">table<\/a> below while the detailed set of report commands can be found in the pump&rsquo;s <a href=\"https:\/\/darwin-microfluidics.com\/content\/pdfs\/2019-05-04_LSPone_OperatingManuel.pdf\" target=\"_blank\" rel=\"noopener\">user manual<\/a>. These commands do not need a trailing [R] character.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-6e9ce52 elementor-widget elementor-widget-shortcode\" data-id=\"6e9ce52\" data-element_type=\"widget\" data-e-type=\"widget\" id=\"table2\" data-widget_type=\"shortcode.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-shortcode\">\n<table id=\"tablepress-32\" class=\"tablepress tablepress-id-32\">\n<thead>\n<tr class=\"row-1\">\n\t<th class=\"column-1\">Command<\/th><th class=\"column-2\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody class=\"row-striping row-hover\">\n<tr class=\"row-2\">\n\t<td class=\"column-1\">Q<\/td><td class=\"column-2\">Current status<\/td>\n<\/tr>\n<tr class=\"row-3\">\n\t<td class=\"column-1\">?<\/td><td class=\"column-2\">Absolute plunger position<\/td>\n<\/tr>\n<tr class=\"row-4\">\n\t<td class=\"column-1\">?2<\/td><td class=\"column-2\">Maximal speed<\/td>\n<\/tr>\n<tr class=\"row-5\">\n\t<td class=\"column-1\">?4<\/td><td class=\"column-2\">Actual plunger position<\/td>\n<\/tr>\n<tr class=\"row-6\">\n\t<td class=\"column-1\">?6<\/td><td class=\"column-2\">Valve position<\/td>\n<\/tr>\n<tr class=\"row-7\">\n\t<td class=\"column-1\">?26<\/td><td class=\"column-2\">Pump address<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<!-- #tablepress-32 from cache --><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-dfd1fde elementor-widget elementor-widget-heading\" data-id=\"dfd1fde\" data-element_type=\"widget\" data-e-type=\"widget\" id=\"examples\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">Examples of Commands<\/h3>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d83e108 elementor-widget elementor-widget-text-editor\" data-id=\"d83e108\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div><b>&nbsp;<\/b><\/div>\n<ul>\n \t<li><strong>\/1Z2R&lt;CR&gt;<\/strong>: Initialize the plunger drive with medium force and home the valve.<\/li>\n \t<li><strong>\/1V250R<\/strong><strong>&lt;CR&gt;<\/strong>: Set the peak speed to 250 pulses\/sec.<\/li>\n \t<li><strong>\/1I4P500M2000I8D500R<\/strong><strong>&lt;CR&gt;<\/strong>: Move clockwise to valve port 4, trigger a pick-up move of 500 steps, delay the next command execution by 2 seconds, move clockwise to valve port 8 and execute a 500-step dispense.<\/li>\n \t<li><strong>\/1I2P1000B9gM1000D200G5R<\/strong><strong>&lt;CR&gt;<\/strong>:&nbsp;Move clockwise to valve port 2, trigger a pick-up move of 1000 steps, move to valve port 9 with the shortest path then repeat the following 5 times:&nbsp;delay the command execution by 1 second before executing a 200-step dispense.<\/li>\n<\/ul>\n<div>&#128680; <em>It is important to mention that the length of the command block is limited to <strong>512 <\/strong>characters&nbsp;due to buffer size limitations.<\/em><\/div>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-de0910c elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"de0910c\" data-element_type=\"section\" data-e-type=\"section\" id=\"python\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-502bcb3\" data-id=\"502bcb3\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-37d8ff7 elementor-widget elementor-widget-heading\" data-id=\"37d8ff7\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">How to Control the LSPone Pump Using the LSPoneQuick Software?<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-9149f70 elementor-widget elementor-widget-text-editor\" data-id=\"9149f70\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>The LSPoneQuick software presents a user-friendly graphical interface designed for easy and efficient navigation. With its macro recording feature, users can create custom automated sequences step-by-step, easily revisiting and modifying them as needed.&nbsp; The software&rsquo;s simple design allows quick access to the LSPone&rsquo;s features which simplifies the handling of the pump tasks.<\/p><p>To connect the pump to the software, follow the instructions in the &quot;Auto&quot; mode on the opening screen or switch to &quot;Manual&quot; mode and select a specific serial port. Once connected, the pump is automatically initialized and the home tab of the software is displayed.&nbsp;<\/p><p>The software has three distinct tabs as can be seen in the screenshot <a href=\"#HomeTab\">below<\/a>: the home tab, the macro recording tab and the settings tab.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-7be2e8d elementor-widget elementor-widget-image\" data-id=\"7be2e8d\" data-element_type=\"widget\" data-e-type=\"widget\" id=\"HomeTab\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img fetchpriority=\"high\" decoding=\"async\" width=\"2047\" height=\"890\" src=\"https:\/\/blog.darwin-microfluidics.com\/wp-content\/uploads\/2024\/05\/LSPoneQuick_HomeTab.png\" class=\"attachment-2048x2048 size-2048x2048 wp-image-23721\" alt=\"A screenshot of the LSPoneQuick software's home tab\" srcset=\"https:\/\/blog.darwin-microfluidics.com\/wp-content\/uploads\/2024\/05\/LSPoneQuick_HomeTab.png 2047w, https:\/\/blog.darwin-microfluidics.com\/wp-content\/uploads\/2024\/05\/LSPoneQuick_HomeTab-300x130.png 300w, https:\/\/blog.darwin-microfluidics.com\/wp-content\/uploads\/2024\/05\/LSPoneQuick_HomeTab-1024x445.png 1024w, https:\/\/blog.darwin-microfluidics.com\/wp-content\/uploads\/2024\/05\/LSPoneQuick_HomeTab-768x334.png 768w, https:\/\/blog.darwin-microfluidics.com\/wp-content\/uploads\/2024\/05\/LSPoneQuick_HomeTab-1536x668.png 1536w\" sizes=\"(max-width: 2047px) 100vw, 2047px\"\/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-f3b535a elementor-widget elementor-widget-text-editor\" data-id=\"f3b535a\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>From the <strong>home tab<\/strong>, you can reinitialize the pump, stop it, choose the resolution of your displacement, choose the volume you want to pickup or dispense, set the syringe speed, select the valve port, etc.<\/p><p>In the <strong>macro recording<\/strong> tab, you can see the command listing in which all the actions performed in the home tab are automatically saved, which allows one to control the pumping program, repeat it and save it for future applications.<\/p><p>From the <strong>settings<\/strong> tab, you can input the communication port, the valve module and the syringe volume.<\/p><p>More details about the LSPoneQuick software can be found in the software&rsquo;s <a href=\"https:\/\/darwin-microfluidics.com\/content\/pdfs\/2017-09-06_LSPoneQuick_UserGuide.pdf\" target=\"_blank\" rel=\"noopener\">user guide<\/a>.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-dea0163 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"dea0163\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-a4a85ae\" data-id=\"a4a85ae\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-b60d8a1 elementor-widget elementor-widget-heading\" data-id=\"b60d8a1\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">How to Control the LSPone Pump Using Python?<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-1f0c319 elementor-widget elementor-widget-text-editor\" data-id=\"1f0c319\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>The LSPone can also be controlled remotely via programming platforms such as Python or Matlab which can give you more flexibility and convenience, especially if you want to run continuously complex pumping programs with loops, pauses, and varying flow rates. Programming platforms are also of specific interest when different devices are used at the same time as they enable the automation of sequences involving all the devices.<\/p><p>In this section,&nbsp;Python code snippets showing how to open the serial port, write and send control command strings to the pump and write a pumping program to the LSPone will be presented.&nbsp;We&rsquo;ll walk through code snippets that demonstrate how to perform common tasks such as moving to a specified valve port, picking up and dispensing liquids, etc. These examples will provide a hands-on understanding of Python-based control of the LSPone syringe pump.<\/p><p>First, we will be utilizing the AMF Tools Python Library, purpose-built for controlling AMF products such as the LSPone.&nbsp;Additionally, we&rsquo;ll demonstrate how to create a custom Python library dedicated to the LSPone&rsquo;s commands.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-52336f7 elementor-widget elementor-widget-heading\" data-id=\"52336f7\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">AMF Tools Python Library<\/h3>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-12e576b elementor-widget elementor-widget-text-editor\" data-id=\"12e576b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><a href=\"https:\/\/amf.ch\/\" target=\"_blank\" rel=\"noopener\">Advanced Microfluidics<\/a>&nbsp;(AMF) has introduced a&nbsp;<a href=\"https:\/\/pypi.org\/project\/AMFTools\/\" target=\"_blank\" rel=\"noopener\">python library<\/a>&nbsp;dedicated to control their instruments including the RVM, SPM and LSPone.&nbsp;To install and utilize the AMFTools package, one can execute the following command in the Python console:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-03af430 elementor-widget elementor-widget-code-highlight\" data-id=\"03af430\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-tomorrow copy-to-clipboard word-wrap\">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-python \">\n\t\t\t\t<code readonly class=\"language-python\">\n\t\t\t\t\t<xmp>pip install AMFTools<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c481c42 elementor-widget elementor-widget-text-editor\" data-id=\"c481c42\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>The library provides a structured set of commands used to interact with AMF devices. These commands encompass essential operations ranging from setting up connections to executing precise movements and adjustments. These are grouped as follows:<\/p><ul><li><strong>General Methods:<\/strong>&nbsp;such as establishing and terminating connections, sending commands, and receiving responses from the device.<\/li><li><strong>Set Functions:<\/strong> functions dedicated to configuring various parameters of the AMF device, including address, syringe size, answer mode, port number, speed, acceleration, and more.<\/li><li><strong>Get functions:<\/strong>&nbsp;functions that facilitate retrieving information about the device&rsquo;s status, configuration, firmware version, valve position, plunger position, and other relevant parameters.<\/li><li><strong>Global Action Functions:<\/strong> including actions such as checking valve and pump status, moving the valve to the target port, resetting the device, and powering it off.<\/li><li><strong>Pump Action Functions:<\/strong> Specifically targeting pump-related operations, this category includes functions for absolute and relative positioning, volume control, pickup, and dispensing actions.<\/li><\/ul><p>For further details regarding the comprehensive list of functions, along with their respective explanations, please refer to the AMF Tools <a href=\"https:\/\/pypi.org\/project\/AMFTools\/\" target=\"_blank\" rel=\"noopener\">page<\/a> on the Python Package Index.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-dde3b5f elementor-widget elementor-widget-text-editor\" data-id=\"dde3b5f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Below is a practical <a href=\"#pycode\">code snippet example<\/a> demonstrating how to use the AMF Tools Python Library to construct a pumping program that replicates the actions shown in the <a href=\"#video\">video<\/a> (LSPone-Laboratory syringe pump from the Advanced Microfluidics SA <a href=\"https:\/\/www.youtube.com\/@advancedmicrofluidicssa6606\" target=\"_blank\" rel=\"noopener\">youtube page<\/a>): initialisation (priming\/air purge) of an LSPone syringe pump with an integrated distribution valve featuring 6 ports, each usable as input or output.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-7b03e03 elementor-widget elementor-widget-video\" data-id=\"7b03e03\" data-element_type=\"widget\" data-e-type=\"widget\" id=\"video\" data-settings='{\"youtube_url\":\"https:\\\/\\\/www.youtube.com\\\/watch?v=P9u3lBuyc6w\",\"start\":13,\"end\":74,\"mute\":\"yes\",\"loop\":\"yes\",\"video_type\":\"youtube\",\"controls\":\"yes\"}' data-widget_type=\"video.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-wrapper elementor-open-inline\">\n\t\t\t<div class=\"elementor-video\"><\/div>\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-a414346 elementor-widget elementor-widget-code-highlight\" data-id=\"a414346\" data-element_type=\"widget\" data-e-type=\"widget\" id=\"pycode\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-tomorrow copy-to-clipboard word-wrap\">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-python line-numbers\">\n\t\t\t\t<code readonly class=\"language-python\">\n\t\t\t\t\t<xmp>'''\r\n----------------------------------------------------------------------------\r\nInitialisation (priming\/air purge) of an LSPone syringe pump with an integrated distribution valve with 6 ports each usable as input or output\r\n----------------------------------------------------------------------------\r\n'''\r\n# Import the required module or class\r\nfrom amfTools import AMF\r\n\r\n#--------------------------------------#\r\n# Establish a connection with the pump #\r\n#--------------------------------------#\r\n\r\n# Specify the serial port, the baud rate and the number of valve ports\r\nserial_port = 'COM4' # change this according to your COM port\r\nbaud_rate   = 9600\r\nvalve_ports = 6  # adjust the number of valve ports to the number you have\r\n\r\n# Initialize the LSPone, create an instance of the AMFDevice class\r\nLSPone = AMF(serial_port, baud_rate, valve_ports)\r\n\r\n# Connect to the device\r\nconnected = LSPone.connect()\r\n\r\n# Check if the connection is successful and print the appropriate message\r\nif connected:\r\n    print(\"Connection successful!\")\r\nelse:\r\n    print(\"Failed to connect.\")\r\n\r\n# Home the device, ensuring it is in a known state\r\nLSPone.home()\r\n\r\n#-----------------------------#\r\n# Start the priming procedure #\r\n#-----------------------------#\r\n\r\n# Liquid picked-up from port 2 then expelled in port 6 used as an output. Pickup and dispense repeated a second time. Air totally removed after first priming. Same procedure applied for inputs 3, 4 and 5 for a bubble-free priming.\r\n\r\n# Define the ports to be used as inputs in this pumping program\r\nports = [2, 3, 4, 5]\r\n\r\n# Iterate through each port in the list\r\nfor port in ports:\r\n    # Perform pumping action twice for each port\r\n    for _ in range(2):\r\n        # Move to the specified input port with the shortest path\r\n        LSPone.valveShortestPath(port) \r\n        # Pickup 100 &micro;L of the liquid knowing that the syringe size is 500 &micro;L\r\n        LSPone.pumpPickupVolume(100,500)\r\n        # Move to port 6 with the shortest path\r\n        LSPone.valveShortestPath(6)\r\n        # Dispense the previously picked-up volume\r\n        LSPone.pumpDispenseVolume(100,500)<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-0f11f3b elementor-widget elementor-widget-heading\" data-id=\"0f11f3b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">How to Communicate with the LSPone Using the Pyserial Library?<\/h3>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-877482d elementor-widget elementor-widget-text-editor\" data-id=\"877482d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>In this part, we explore how to communicate with the LSPone pump, using the <a href=\"https:\/\/pypi.org\/project\/pyserial\/\" target=\"_blank\" rel=\"noopener\">PySerial<\/a> library<span style=\"color: inherit; font-family: var( --e-global-typography-text-font-family ), Sans-serif; font-weight: var( --e-global-typography-text-font-weight ); font-size: 1rem; letter-spacing: -0.01rem;\">&nbsp;used to access and control serial ports, providing a convenient interface for sending and receiving data to and from serial devices.<\/span><\/p><p>The provided <a href=\"#pyserialCODE\">code snippet<\/a> demonstrates how to send commands to the LSPone pump, with several examples provided (the ones presented just <a href=\"#examples\">above<\/a>) including initializing the pump, setting parameters such as peak speed, and executing complex sequences of actions. Each command is sent using the `send_command` method function.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-49e42a4 elementor-widget elementor-widget-code-highlight\" data-id=\"49e42a4\" data-element_type=\"widget\" data-e-type=\"widget\" id=\"pyserialCODE\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-tomorrow copy-to-clipboard word-wrap\">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-python line-numbers\">\n\t\t\t\t<code readonly class=\"language-python\">\n\t\t\t\t\t<xmp>'''\r\n--------------------------------------------------\r\nWriting\/Reading Single Commands to\/from the LSPone\r\n--------------------------------------------------\r\n'''\r\nimport serial\r\nimport time\r\n\r\nclass AMF:\r\n    \r\n    # Initializing the object and establishing a serial connection with the corresponding data format \r\n    def __init__(self, COM):   \r\n        self.COM = COM\r\n        self.ser = serial.Serial(COM, baudrate=9600, parity=serial.PARITY_NONE, stopbits=serial.STOPBITS_ONE, bytesize=serial.EIGHTBITS)\r\n\r\n    # Send a command to the device\r\n    def send_command(self, command, with_trailing_R=True):\r\n        # Wait for any previous response to clear \r\n        time.sleep(0.05)\r\n        self.ser.read_all()\r\n        \r\n        command_str = f'\/1{command}'\r\n        # Append 'R' to the command if specified\r\n        if with_trailing_R:\r\n            command_str += 'R'\r\n        # Append '\\r' (carriage return) to the command\r\n        command_str += '\\r' \r\n        # Write the command to the serial port\r\n        self.ser.write(command_str.encode())\r\n        time.sleep(0.05)\r\n\r\n#------------------------------------------------#\r\n# To execute a command with a trailing 'R':      #\r\n# send_command(\"command\")                        #\r\n#                                                #\r\n# To execute a command without a trailing 'R':   #\r\n# send_command(\"command\", with_trailing_R=False) #\r\n#------------------------------------------------#\r\n\r\n    # Get a response from the device\r\n    def get_response(self):\r\n        response = self.ser.readline().decode().strip()\r\n        return response\r\n\r\n#----------------------------------------------#\r\n# Examples on how to send commands to the pump #\r\n#----------------------------------------------#\r\n\r\n# Initialize the pump (12 port valve) with the specified COM port\r\nLSPone = AMF('COM4')\r\n\r\n# Initialize the plunger drive with medium force and home the valve\r\nLSPone.send_command('Z2')\r\n\r\n# Set the peak speed to 250 pulses\/sec\r\nLSPone.send_command('V250')\r\n\r\n# Move clockwise to valve port 4, trigger a pick-up move of 500 steps, delay the next command execution by 2 seconds, move clockwise to valve port 8 and execute the 500-step dispense\r\nLSPone.send_command('I4P500M2000I8D500')\r\n\r\n# Move clockwise to valve port 2, trigger a pick-up move of 1000 steps, move to valve port 9 with the shortest path then repeat the following 5 times: delay the command execution by 1 second before executing a 200-step dispense\r\nLSPone.send_command('I2P1000B9gM1000D200G5')\r\n\r\n# Verify the valve port position\r\nLSPone.send_command('?6', with_trailing_R=False)\r\nLSPone.get_response()\r\n\r\n\r\n<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-3a62046 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"3a62046\" data-element_type=\"section\" data-e-type=\"section\" id=\"matlab\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-dc62857\" data-id=\"dc62857\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-25817d8 elementor-widget elementor-widget-heading\" data-id=\"25817d8\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">How to Control the LSPone Pump Using Matlab?<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-2a54795 elementor-widget elementor-widget-text-editor\" data-id=\"2a54795\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>In this section,&nbsp;a Matlab code snippet will be presented, showing how to open the serial port, write and send control command strings to the pump. For that, a quick start adapter class is defined, dedicated to the LSPone&rsquo;s commands.<\/p><p>We&rsquo;ll walk through codelines that demonstrate how to perform common tasks such as moving to a specified valve port, picking up and dispensing liquids, etc.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-11ab9a0 elementor-widget elementor-widget-code-highlight\" data-id=\"11ab9a0\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-tomorrow copy-to-clipboard word-wrap\">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-git line-numbers\">\n\t\t\t\t<code readonly class=\"language-git\">\n\t\t\t\t\t<xmp>classdef LSPone\r\n    properties\r\n        COM\r\n        ser\r\n    end\r\n    \r\n    methods\r\n        % Initializing the object and establishing a serial connection\r\n        function obj = LSPone(COM)\r\n            obj.COM = COM;\r\n            obj.ser = serialport(obj.COM, 9600, 'Parity', 'none', 'StopBits', 1, 'DataBits', 8);\r\n        end\r\n        \r\n        % Closing the serial connection and deleting the object\r\n        function delete(obj)\r\n            delete(obj.ser);\r\n            obj.ser = [];\r\n        end\r\n        \r\n        % Sending a command to the device\r\n        function send_command(obj, command, with_trailing_R)\r\n            % make with_trailing_R true by default\r\n            if nargin  1600\r\n                error('Speed must be a positive integer smaller than 1600.');\r\n            end\r\n            obj.send_command(['V', num2str(speed)]);\r\n        end\r\n        \r\n        % Get the valve position\r\n        function valve_position = get_valve_position(obj)\r\n            obj.send_command('?6',false);\r\n            valve_position = obj.get_response();\r\n        end\r\n    end\r\nend\r\n\r\n%----------------------------------------------------------------%\r\n% Examples on how to use the defined class to control the LSPone %\r\n%----------------------------------------------------------------%\r\n\r\n% Connect the pump\r\n% pump = LSPone('COM4');\r\n\r\n% Initialize the plunger drive with medium force and home the valve \r\n% pump.initialize_plunger(2);\r\n\r\n% Move to port 4 with shortest path\r\n% pump.move_shortest(4);\r\n\r\n% Trigger a pick-up move of 1000 steps\r\n% pump.relative_pickup(1000);\r\n\r\n% Verify the valve port position\r\n% pump.get_valve_position();\r\n\r\n% Execute a 400-step dispense\r\n% pump.relative_dispense(400);\r\n\r\n% Move clockwise to valve port 2, trigger a pick-up move of 1000 steps, move to valve port 9 with the shortest path then repeat the following 5 times: delay the command execution by 1 second before executing a 200-step dispense\r\n% pump.send_command('I2P1000B9gM1000D200G5');\r\n\r\n% Disconnect and delete device\r\n% delete(pump);<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-30f79fb elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"30f79fb\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-50b3f4b\" data-id=\"50b3f4b\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-f7e9052 elementor-widget elementor-widget-heading\" data-id=\"f7e9052\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Conclusion<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-258ccf0 elementor-widget elementor-widget-text-editor\" data-id=\"258ccf0\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>In this blog post, we&rsquo;ve introduced the&nbsp;LSPone laboratory syringe pump&nbsp;and&nbsp;explored the basics of its external control via two programming platforms, Python and Matlab, using the LSPone communication command set.&nbsp; We hope this post serves as a valuable guide for researchers and engineers seeking to employ the LSPone laboratory syringe pump in their microfluidics research and experiments.<\/p><p>Stay tuned for more insights, tutorials, and practical applications in our future posts. Until then, happy pumping and coding &#128187;!<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-096e0db elementor-widget elementor-widget-text-editor\" data-id=\"096e0db\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><span style=\"font-weight: 400;\">&#128231; If you have any questions or feedback, please feel free to contact us at <\/span><a href=\"https:\/\/darwin-microfluidics.com\/pages\/contact-us\"><span style=\"font-weight: 400;\">support@darwin-microfluidics.com<\/span><\/a><span style=\"font-weight: 400;\">.<\/span><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-9e6b221 elementor-widget elementor-widget-global elementor-global-18550 elementor-widget-pix-promo-box\" data-id=\"9e6b221\" data-element_type=\"widget\" data-e-type=\"widget\" id=\"cta2\" data-widget_type=\"pix-promo-box.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"pix-promo-box card w-100 h-1002 bg-heading-default  pix-hover-item rounded-10 position-relative overflow-hidden text-white   text-left w-100 d-block\"><img decoding=\"async\" src=\"https:\/\/blog.darwin-microfluidics.com\/wp-content\/uploads\/2024\/02\/image-WTTJ-1-1.jpg\" class=\"card-img pix-bg-image pix-img-scale h-100 rounded-10 pix-opacity-4 pix-hover-opacity-4\" alt=\"Need some help with your microfluidic project?\"\/><a href=\"https:\/\/darwin-microfluidics.com\/contact-us\" class=\"card-img-overlay2 d-inline-block w-100 pix-img-overlay pix-p-20 d-flex align-items-end\" style=\"min-height:300px;\"><div class=\"w-100\"><div class=\"\"><span class=\"pix-badge-element d-inline-block mr-1 \"><span class=\"badge font-weight-bold bg-primary  \" style=\"font-size:22px; \"><span class=\"text-white\" style=\"\">Contact our experts!<\/span><\/span><\/span><\/div><h2 class=\"card-title font-weight-bold text-white pix-my-10\" style=\"\">Need some help with your microfluidic project?<\/h2><span class=\"d-flex align-items-center font-weight-bold text-light-opacity-6 text-20\"><span>We can make microfluidics easy for you!<\/span><i class=\"pixicon-angle-right pix-hover-right pix-hover-item pix-ml-10 font-weight-bold text-20\"><\/i><\/span><\/div><\/a><\/div>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Syringe pumps serve as indispensable tools for accurately delivering liquid volumes. Among these, the LSPone stands out in the world of laboratory automation for its exceptional performance and versatility. In this blog post, we&rsquo;ll explore how to control the LSPone&hellip;<\/p>\n","protected":false},"author":4,"featured_media":23571,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_kc_parent_guide":"","_kc_products":"","_kc_type":"","_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[24,33],"tags":[],"class_list":["post-23569","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-flow-control","category-guides"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to control the LSPone via Python and Matlab ?<\/title>\n<meta name=\"description\" content=\"Learn how to control the LSPone syringe pump externally with Python and Matlab for a precise control of your microfluidics experiments.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.darwin-microfluidics.com\/how-to-control-the-lspone-via-python-and-matlab\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to control the LSPone via Python and Matlab ?\" \/>\n<meta property=\"og:description\" content=\"Learn how to control the LSPone syringe pump externally with Python and Matlab for a precise control of your microfluidics experiments.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog.darwin-microfluidics.com\/how-to-control-the-lspone-via-python-and-matlab\/\" \/>\n<meta property=\"og:site_name\" content=\"Darwin Microfluidics\" \/>\n<meta property=\"article:published_time\" content=\"2024-05-15T14:52:19+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-11-19T14:24:59+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/blog.darwin-microfluidics.com\/wp-content\/uploads\/2024\/04\/LSPone.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"640\" \/>\n\t<meta property=\"og:image:height\" content=\"640\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Elia Missi\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Elia Missi\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/blog.darwin-microfluidics.com\\\/how-to-control-the-lspone-via-python-and-matlab\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blog.darwin-microfluidics.com\\\/how-to-control-the-lspone-via-python-and-matlab\\\/\"},\"author\":{\"name\":\"Elia Missi\",\"@id\":\"https:\\\/\\\/blog.darwin-microfluidics.com\\\/#\\\/schema\\\/person\\\/c80a1276036340d7e994346f251af8f5\"},\"headline\":\"How to control the LSPone via Python and Matlab ?\",\"datePublished\":\"2024-05-15T14:52:19+00:00\",\"dateModified\":\"2026-11-19T14:24:59+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/blog.darwin-microfluidics.com\\\/how-to-control-the-lspone-via-python-and-matlab\\\/\"},\"wordCount\":1891,\"publisher\":{\"@id\":\"https:\\\/\\\/blog.darwin-microfluidics.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/blog.darwin-microfluidics.com\\\/how-to-control-the-lspone-via-python-and-matlab\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/blog.darwin-microfluidics.com\\\/wp-content\\\/uploads\\\/2024\\\/04\\\/LSPone.jpg\",\"articleSection\":[\"Flow control\",\"Guides &amp; tutorials\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/blog.darwin-microfluidics.com\\\/how-to-control-the-lspone-via-python-and-matlab\\\/\",\"url\":\"https:\\\/\\\/blog.darwin-microfluidics.com\\\/how-to-control-the-lspone-via-python-and-matlab\\\/\",\"name\":\"How to control the LSPone via Python and Matlab ?\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blog.darwin-microfluidics.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/blog.darwin-microfluidics.com\\\/how-to-control-the-lspone-via-python-and-matlab\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/blog.darwin-microfluidics.com\\\/how-to-control-the-lspone-via-python-and-matlab\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/blog.darwin-microfluidics.com\\\/wp-content\\\/uploads\\\/2024\\\/04\\\/LSPone.jpg\",\"datePublished\":\"2024-05-15T14:52:19+00:00\",\"dateModified\":\"2026-11-19T14:24:59+00:00\",\"description\":\"Learn how to control the LSPone syringe pump externally with Python and Matlab for a precise control of your microfluidics experiments.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/blog.darwin-microfluidics.com\\\/how-to-control-the-lspone-via-python-and-matlab\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/blog.darwin-microfluidics.com\\\/how-to-control-the-lspone-via-python-and-matlab\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/blog.darwin-microfluidics.com\\\/how-to-control-the-lspone-via-python-and-matlab\\\/#primaryimage\",\"url\":\"https:\\\/\\\/blog.darwin-microfluidics.com\\\/wp-content\\\/uploads\\\/2024\\\/04\\\/LSPone.jpg\",\"contentUrl\":\"https:\\\/\\\/blog.darwin-microfluidics.com\\\/wp-content\\\/uploads\\\/2024\\\/04\\\/LSPone.jpg\",\"width\":640,\"height\":640,\"caption\":\"A photo of the LSPone laboratory syringe pump with a white background\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/blog.darwin-microfluidics.com\\\/how-to-control-the-lspone-via-python-and-matlab\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/blog.darwin-microfluidics.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to control the LSPone via Python and Matlab ?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/blog.darwin-microfluidics.com\\\/#website\",\"url\":\"https:\\\/\\\/blog.darwin-microfluidics.com\\\/\",\"name\":\"Blog\",\"description\":\"Our Blog\",\"publisher\":{\"@id\":\"https:\\\/\\\/blog.darwin-microfluidics.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/blog.darwin-microfluidics.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/blog.darwin-microfluidics.com\\\/#organization\",\"name\":\"Darwin Microfluidics\",\"url\":\"https:\\\/\\\/blog.darwin-microfluidics.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/blog.darwin-microfluidics.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/blog.darwin-microfluidics.com\\\/wp-content\\\/uploads\\\/2024\\\/02\\\/Darwin-Microfluidics-logo.png\",\"contentUrl\":\"https:\\\/\\\/blog.darwin-microfluidics.com\\\/wp-content\\\/uploads\\\/2024\\\/02\\\/Darwin-Microfluidics-logo.png\",\"width\":300,\"height\":90,\"caption\":\"Darwin Microfluidics\"},\"image\":{\"@id\":\"https:\\\/\\\/blog.darwin-microfluidics.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/company\\\/darwin-microfluidics\\\/\",\"https:\\\/\\\/darwin-microfluidics.com\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/blog.darwin-microfluidics.com\\\/#\\\/schema\\\/person\\\/c80a1276036340d7e994346f251af8f5\",\"name\":\"Elia Missi\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/aaae1cf6fd60bdd2785e730c1eef40d923b09eadd04f575148e3be51d2e1c35a?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/aaae1cf6fd60bdd2785e730c1eef40d923b09eadd04f575148e3be51d2e1c35a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/aaae1cf6fd60bdd2785e730c1eef40d923b09eadd04f575148e3be51d2e1c35a?s=96&d=mm&r=g\",\"caption\":\"Elia Missi\"},\"url\":\"https:\\\/\\\/blog.darwin-microfluidics.com\\\/author\\\/eliamissi\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to control the LSPone via Python and Matlab ?","description":"Learn how to control the LSPone syringe pump externally with Python and Matlab for a precise control of your microfluidics experiments.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.darwin-microfluidics.com\/how-to-control-the-lspone-via-python-and-matlab\/","og_locale":"en_US","og_type":"article","og_title":"How to control the LSPone via Python and Matlab ?","og_description":"Learn how to control the LSPone syringe pump externally with Python and Matlab for a precise control of your microfluidics experiments.","og_url":"https:\/\/blog.darwin-microfluidics.com\/how-to-control-the-lspone-via-python-and-matlab\/","og_site_name":"Darwin Microfluidics","article_published_time":"2024-05-15T14:52:19+00:00","article_modified_time":"2026-11-19T14:24:59+00:00","og_image":[{"width":640,"height":640,"url":"https:\/\/blog.darwin-microfluidics.com\/wp-content\/uploads\/2024\/04\/LSPone.jpg","type":"image\/jpeg"}],"author":"Elia Missi","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Elia Missi","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/blog.darwin-microfluidics.com\/how-to-control-the-lspone-via-python-and-matlab\/#article","isPartOf":{"@id":"https:\/\/blog.darwin-microfluidics.com\/how-to-control-the-lspone-via-python-and-matlab\/"},"author":{"name":"Elia Missi","@id":"https:\/\/blog.darwin-microfluidics.com\/#\/schema\/person\/c80a1276036340d7e994346f251af8f5"},"headline":"How to control the LSPone via Python and Matlab ?","datePublished":"2024-05-15T14:52:19+00:00","dateModified":"2026-11-19T14:24:59+00:00","mainEntityOfPage":{"@id":"https:\/\/blog.darwin-microfluidics.com\/how-to-control-the-lspone-via-python-and-matlab\/"},"wordCount":1891,"publisher":{"@id":"https:\/\/blog.darwin-microfluidics.com\/#organization"},"image":{"@id":"https:\/\/blog.darwin-microfluidics.com\/how-to-control-the-lspone-via-python-and-matlab\/#primaryimage"},"thumbnailUrl":"https:\/\/blog.darwin-microfluidics.com\/wp-content\/uploads\/2024\/04\/LSPone.jpg","articleSection":["Flow control","Guides &amp; tutorials"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/blog.darwin-microfluidics.com\/how-to-control-the-lspone-via-python-and-matlab\/","url":"https:\/\/blog.darwin-microfluidics.com\/how-to-control-the-lspone-via-python-and-matlab\/","name":"How to control the LSPone via Python and Matlab ?","isPartOf":{"@id":"https:\/\/blog.darwin-microfluidics.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/blog.darwin-microfluidics.com\/how-to-control-the-lspone-via-python-and-matlab\/#primaryimage"},"image":{"@id":"https:\/\/blog.darwin-microfluidics.com\/how-to-control-the-lspone-via-python-and-matlab\/#primaryimage"},"thumbnailUrl":"https:\/\/blog.darwin-microfluidics.com\/wp-content\/uploads\/2024\/04\/LSPone.jpg","datePublished":"2024-05-15T14:52:19+00:00","dateModified":"2026-11-19T14:24:59+00:00","description":"Learn how to control the LSPone syringe pump externally with Python and Matlab for a precise control of your microfluidics experiments.","breadcrumb":{"@id":"https:\/\/blog.darwin-microfluidics.com\/how-to-control-the-lspone-via-python-and-matlab\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.darwin-microfluidics.com\/how-to-control-the-lspone-via-python-and-matlab\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.darwin-microfluidics.com\/how-to-control-the-lspone-via-python-and-matlab\/#primaryimage","url":"https:\/\/blog.darwin-microfluidics.com\/wp-content\/uploads\/2024\/04\/LSPone.jpg","contentUrl":"https:\/\/blog.darwin-microfluidics.com\/wp-content\/uploads\/2024\/04\/LSPone.jpg","width":640,"height":640,"caption":"A photo of the LSPone laboratory syringe pump with a white background"},{"@type":"BreadcrumbList","@id":"https:\/\/blog.darwin-microfluidics.com\/how-to-control-the-lspone-via-python-and-matlab\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blog.darwin-microfluidics.com\/"},{"@type":"ListItem","position":2,"name":"How to control the LSPone via Python and Matlab ?"}]},{"@type":"WebSite","@id":"https:\/\/blog.darwin-microfluidics.com\/#website","url":"https:\/\/blog.darwin-microfluidics.com\/","name":"Blog","description":"Our Blog","publisher":{"@id":"https:\/\/blog.darwin-microfluidics.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.darwin-microfluidics.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/blog.darwin-microfluidics.com\/#organization","name":"Darwin Microfluidics","url":"https:\/\/blog.darwin-microfluidics.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.darwin-microfluidics.com\/#\/schema\/logo\/image\/","url":"https:\/\/blog.darwin-microfluidics.com\/wp-content\/uploads\/2024\/02\/Darwin-Microfluidics-logo.png","contentUrl":"https:\/\/blog.darwin-microfluidics.com\/wp-content\/uploads\/2024\/02\/Darwin-Microfluidics-logo.png","width":300,"height":90,"caption":"Darwin Microfluidics"},"image":{"@id":"https:\/\/blog.darwin-microfluidics.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.linkedin.com\/company\/darwin-microfluidics\/","https:\/\/darwin-microfluidics.com"]},{"@type":"Person","@id":"https:\/\/blog.darwin-microfluidics.com\/#\/schema\/person\/c80a1276036340d7e994346f251af8f5","name":"Elia Missi","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/aaae1cf6fd60bdd2785e730c1eef40d923b09eadd04f575148e3be51d2e1c35a?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/aaae1cf6fd60bdd2785e730c1eef40d923b09eadd04f575148e3be51d2e1c35a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/aaae1cf6fd60bdd2785e730c1eef40d923b09eadd04f575148e3be51d2e1c35a?s=96&d=mm&r=g","caption":"Elia Missi"},"url":"https:\/\/blog.darwin-microfluidics.com\/author\/eliamissi\/"}]}},"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/blog.darwin-microfluidics.com\/wp-content\/uploads\/2024\/04\/LSPone.jpg","_links":{"self":[{"href":"https:\/\/blog.darwin-microfluidics.com\/wp-json\/wp\/v2\/posts\/23569","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.darwin-microfluidics.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.darwin-microfluidics.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.darwin-microfluidics.com\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.darwin-microfluidics.com\/wp-json\/wp\/v2\/comments?post=23569"}],"version-history":[{"count":283,"href":"https:\/\/blog.darwin-microfluidics.com\/wp-json\/wp\/v2\/posts\/23569\/revisions"}],"predecessor-version":[{"id":25279,"href":"https:\/\/blog.darwin-microfluidics.com\/wp-json\/wp\/v2\/posts\/23569\/revisions\/25279"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.darwin-microfluidics.com\/wp-json\/wp\/v2\/media\/23571"}],"wp:attachment":[{"href":"https:\/\/blog.darwin-microfluidics.com\/wp-json\/wp\/v2\/media?parent=23569"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.darwin-microfluidics.com\/wp-json\/wp\/v2\/categories?post=23569"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.darwin-microfluidics.com\/wp-json\/wp\/v2\/tags?post=23569"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}