Random Ramblings on LabVIEW Design

Community Browser
Labels
cancel
Showing results for 
Search instead for 
Did you mean: 
swatts
3426 Views
6 Comments

Hello My Gorgeous Graphical Programming Godesses and Gods,

Today I wrote a vi to convert free text into Binary Large Objects and back again (for putting into databases)

and I called it.

BlobDeBlob.vi

BestNameEver.png

I think this is the best name ever!!

or is it? better names in comments please.

Have a great weekend

Love

Steve

swatts
3192 Views
0 Comments

The final piece in the recovery puzzle is bug reporting.

I didn't fancy designing the whole thing from scratch so instead I searched around for a MySQL schema for such things, step up bugzilla. I was quite pleased with how I got hold of it. On a virtual machine I loaded a turnkey linux bugzilla system I then did a MySQLDump of the schema and loaded it onto my VPS.

I wanted to have bug reporting in our General Template and as a standalone application. I downloaded some MySQL LabVIEW VIs  that work very nicely and stuck these in my project and wrapped them as I normally do.

MySQL.png

Then I put in a bug reporting screen.

BugReportingScreen.png

If you are doing a reasonable amount of MySQL I advise coughing up for Navicat, it saves so much time on creating and testing queries.

Navicat.png

We can then take the generated SQL and make this in LabVIEW.

SQL1.png

We just replace the variables in the query with %s and away we go.

The other aspect of Bug Reporting is to see the status of the reported bugs.

BugsScreen.png

I put in a filter that controlled my queries, preloaded with all the status's (already loaded this for the previous screen, so just a menu item on the string)

Another right-click menu item allows us to edit the bug.

Because I don't want to maintain the bug reporting screen on all my projects I make it into an executable and have it as separate project. I call it using the command line and use command line arguments to pass the project name.

Commandline.png

This is the bug reporting screen for our Project Management Utility. I add some posh splash screens etc to the build, the final bit of the puzzle is to get it to update itself. Here's how

Phew that was a few hours work! Thanks codespaces and your careless disregard for simple security.

If anyone is going a similar direction, leave a comment, I am happy to give what advise/help I can.

Now where was I with Open Document Format???????

Lots of Love

Steve

PS I'm only implementing a part of bugzilla at the moment, it's a big lump of database and quite nicely designed too. Looking at the schema is a good place to start.

swatts
4557 Views
11 Comments

Hello my lovelies,

Hope you are all safely back from NIWeek, vacations etc.

I'm most interested in the new cDAQ and cRIO platforms they look a real advance.

I'm all back and running again now and implemented some pretty nice stuff on my VPS (I still have a lot to learn here so fair warning). The VPS Subversion repositories are working lovely and I've even used post-commit triggers to send emails of any commit action, this is very cool and I didn't know Subversion even had this capability.

Popular advice is store your backups in the cloud, bitter experience has shown that actually the reverse is also vital. So this article discusses getting your stuff back from the server.

First things first lets look at repositories. We store a repository in a directory /usr/local/svn/repos/CompanyName-RepoName (for example our documentation will be stored in /usr/local/svn/repos/SSDC-CompanyDocs)

We want to list the directory /usr/local/svn/repos and pull out a list of Repos, we then want to zip them up and post them to a directory accessible by FTP

svnadmin dump /usr/local/svn/repos/REPONAME | gzip > /home/ftp/REPONAME.gz

The above Linux command will dump the repository at /usr/local/svn/repos/REPONAME and pipe it to a gzip file REPONAME.gz. Here I sacrificed speed for UI feedback by doing each file individually and then ftp'ing it out.

BackupDialog.png

IMPORTANT NOTE: Remember to password your VIs to protect your important login information!!!!!

I had to doctor the standard LabVIEW FTP VIs to give me some real-time feedback of transferred data. This involved copying \National Instruments\LabVIEW 2013\vi.lib\FTP over to my project and making a LVLIB to hold it. I add some Local Globals (my facetious name for a privately scoped global variable) to get the data going through TCP/IP.

TCP Read Stream.png

I also added a publicly scoped VI to allow me to read the global data. Now I have a nice progress bar control updating with transferred data.

BackupDialogCode.png

Noticed that I changed the colour of the FTP Get Multiple Files.vi, this is a mental clue that I have changed a standard LabVIEW VI.

I also dump my shared databases using the similar Linux command. The process after that is exactly the same.

mysqldump --user=******* --password=******* dbName | gzip > /home/ftp/dbName.gz

If you want any details, leave a comment and I'll fill in the gaps. If you want any code I'm sure we can sort something out, especially if you're not a local competitor .

Next week will be the last in this series and I'll be looking at bug reporting.

Lots of Love

Steve

I saved you time generating a mission statement in a previous article, now I'm going to save you time if you fancy writing an episode of Murder She Wrote.

MurderSheWrote.jpg

Click on Jessica to see more.