Pokazywanie postów oznaczonych etykietą LabVIEW. Pokaż wszystkie posty
Pokazywanie postów oznaczonych etykietą LabVIEW. Pokaż wszystkie posty

środa, 5 sierpnia 2020

Projekty do szuflady? Czemu nie.


OpenSPAD - płytka w/g mojego projektu
Ostatnio tutaj nic się nie dzieje. Z przyczyn różnych: wykańczam dom, więc mam istotnie mniej czasu, na cokolwiek poza tym i pracą zawodową; ta ostatnia też mocniej niż zazwyczaj mnie pochłania. Dodatkowo, sezon rekonstrukcyjny chyba dokumentnie zdechł w tym roku - brak imprez jakichkolwiek średnio motywuje mnie do czegokolwiek w tym zakresie, a fakt, że część rzeczy pojechała już do nowego domu nie ułatwia mi zabranie się za jakąkolwiek robotę 😉.

Ale robię też ciekawe rzeczy. Szkoda, że większość związana jest z pracą i raczej się tutaj nie pojawi. Te niezwiązane bezpośrednio z pracą wynikają głównie z faktu, że a) uczę się nowego oprogramowania - KiCad; b) mam planach - pewnie dalekich - poskładanie kilku urządzeń wprost z labu fizycznego. 

Nauka softu do projektowania PCB jest o tyle przyjemna, o ile fajne projekty się robi - nie wyobrażam sobie jej inaczej, niż projektując ciekawe płytki. Dlatego też trochę projektów "do szuflady" właśnie powstaje lub niebawem powstanie. Część to urządzenia w/g projektów z sieci, ewentualnie zmodyfikowane przeze mnie, część to urządzenia od podstaw zaprojektowane przeze mnie. W najbliższym czasie zamierzam pokazać kilka z nich.

W międzyczasie bawię się także kilkoma dev-kitami, więc może i o nich coś niebawem napiszę. Mam na tapecie PSoCa (znowy!) i logikę programowalną, między innymi po to, by lepiej zaprojektować pewne systemy "do szuflady", a może i nie...



wtorek, 20 marca 2018

Impedance spectrometer


Some time ago I was showing 3D render of my impedance spectrometer project. It was planned for a competition on Elektroda.pl, but of course I massively misjudged the amount of time needed to finish the project (it is still not finished). So I cab shed some light on the device, I guess...

Impedance spectrometer is a device that measures the complex impedance - real resistance + imaginary reactance as a function of frequency. It is widely used in sensor applications, biosensing, electrochemistry and material sciences. We will talk about some of the applications later on, when the device will be finished and ready to perform some test measurements.

sobota, 29 lipca 2017

Synchronizing inputs and outputs in DAQmx

I'm writing this simple tutorial mostly for myself, as I am tackling generally the same problem third time in my life, and third time I had to (re)invent the exact method how to do that. The problem is very basic: How to synchronize two (or more) outputs in inputs in a NI data acquisition setup, using DAQmx in LabVIEW? By synchronizing I mean e.g. a situation where we are sampling two outputs simultanosly or measuring some data in sync with a control output.

poniedziałek, 17 kwietnia 2017

Running LabVIEW from PowerShell

Recently I was in a need to run LabVIEW VI from PowerShell while using Jenkins. The Jenkins part is pretty straightforward - you only need to install the PowerShell plugin for Jenkins and then you can run PowerShell command as a build step.

Running a VI from PS is simple, as long as you don't need to pass any commands. First of all, to make life easier add the LabVIEW executable path to the PATH environmental variable, and then just use:
Start LabVIEW C:\path\toYour\file.vi
but if you need to passy any commandline arguments to the VI (which was really important for me) trying to run the following command:
Start LabVIEW C:\path\toYour\file.vi -- arg1 arg2
resulted in an error, as LabVIEW could not find files arg1 nor arg2. To pass the exact command to the LabVIEW with arguments you have to make a clever use of apostrohes an quotation marks:
Start LabVIEW "C:\path\toYour\file.vi -- arg1 arg2"
If you want to get the commands from some variables things start to be even more complicated and you will have to use both - quotation marks and apostrophes in order to make something like:
Start LabVIEW "' + C:\path\toYour\file.vi -- arg1=" + $arg1 + " arg2=" + $arg2 + " logpath=" + $logpath + '.txt"
What I was doing was using Invoke-Expression from PS to run the command above, as it was easier than constructing the same command several times:
$code = 'Start LabVIEW "' + C:\path\toYour\file.vi -- arg1=" + $arg1 + " arg2=" + $arg2 + " logpath=" + $logpath + '.txt"'
Invoke-Expression $code
Why? mainly because you can e.g. use the Invoke-Expresson remotely on several machines over network etc. But this is totally different part of the story.

LabVIEWwise, parsing of the command line arguments is really simple, especially that I used the contruction of argument_name=argument_value, so I was able to parse them and get the values pretty straighforwards using a single case structure.