Entradas

Mostrando entradas de octubre, 2017

Simple FTP client for LabVIEW

Imagen
LabVIEW comes with its own nice pack of FTP functions , but some time ago I needed a very low level control over the communication with a particularly stubborn equipment that returned strange codes and list formats. You know, that's the problem with the FTP protocol: it was designed for human interaction and sometimes the automatization can be really hard if the server is not respecting supposed standards. So I developed some very simple VIs to see what were going down there, and now they're in this blog in case anybody needs a simple and direct way of FTP communication. The top-level functions offered are LIST, GET, PUT, DELE and RMD, the basics to manipulate files, and both active and passive modes are allowed. I think their main utility is to see how things go in the TCP chatting between client and server. Download (LLB for LabVIEW 2016) To demonstrate how they work, I have developed a simple FTP client that connects to a FTP server of your choosing and allows to n

Implode / Explode

Imagen
LabVIEW lacks native implode/explode functions for strings, to split a string into an array and vice versa. This is easily feasible thanks to the Spreadsheet String To Array function and its opposite Array to Spreadsheet String , but it's useful having a couple of VIs ready to do the work. Download explode.vi (VI for LabVIEW 2016) The explode function is pretty straightforward, but imploding is a little harder since the parallel function puts a carriage return / line feed at the end of the resulting string, and we need to remove it applying a trim. Trim is not the best function in performance and could add more problems (for example if the last chunk has a white space at the end), so I have implemented an alternative simple for-loop mechanism. Download implode.vi (VI for LabVIEW 2016) Check the code and select the mode you are mor confortable with.