m2oTech.com

  • Increase font size
  • Default font size
  • Decrease font size
m2oTech.com

Pipelining in LabVIEW

Print PDF

A very simple concept to improve execution performance in LabVIEW. I found this on National Instruments website, while looking for information on how to handle threads in LabVIEW.

(image source: ni.com)

If A and B are two parts of the same process (calculation, ...) to be executed in a loop, we can execute half of it (A) in this iteration and the rest (B) in the next iteration. With only one more iteration (or maybe two?) we offer the compiler a chance to split the load on two CPUs, if available (that will be done by LV automatically).

 

Feature Phones Crashed by SMS Virus

Print PDF

What is a "feature phone" anyway? It is, as I've learned, a "normal cellphone", i.e. not a smartphone. One of those "old" phones 80% of worldwide mobile phones users (including myself) rely on. It turns out these old phones can be crashed quite easily by a malicious SMS through "special binary characters and overflowed headers" according to this article.

The process is aided by the network carrier repeating the sending operation when this fails, and by a special shutdown watchdog which is built in in some older Nokia phones, which shuts down the phone after receiving three malformed SMSes in a row.

What's not so bad in all this, is that the effects are only temporary, as the phone will work fine after restarting.

 

Firefox profile won't start

Print PDF

I use profiles in Firefox extensively. I have a few profiles setup, for example one will open a single tag and go directly to my webmail address, another one will popup a few dictionaries, one would be for general use and one for testing. This is a very convenient and efficient way in my opinion, to start Firefox with a profile just use a command line like the following:

# this will start firefox with profilename
firefox -P profilename --no-remote

# this will present a list of available profiles to choose from (can also create new)
firefox -P --no-remote

In Linux (Gnome/KDE) a launcher can be created to call one of the above commands, very similar commands can also be used in Windows (create a link calling the above command, preferably with full path to firefox.exe).

Today I had no response when starting one of my profiles (other profiles working normally). Starting from terminal will produce no output at all, nor error messages anywhere in the system log. In the process list firefox would simply not appear. Tried logging out and back in (Gnome), before trying a full system restart I found out about Firefox safe mode, this is what solved my problem:

firefox --safe-mode -P troubledprofile --no-remote

Didn't tick any checkbox in the safe mode menu and Firefox ran as expected, except disabling some of the add-on. Closing Firefox and re-running in normal mode got everything back and running again!

 

Recover Freerunner with a dead battery

Print PDF

It's one of those "bugs" that would put off any potential buyer of this "opensource mobile phone". That is, if he or she is not ready to go through a tutorial just to charge a battery...

The issue is that the battery can only be *properly* charged when a OS is running, thus not when the freerunner is powered off (see note below). If the battery is completely empty the phone will simply not start, not even with a charger plugged in (see note again). You need to start the phone in order to charge the battery but that is not possible unless the battery is already charged... nice loop.

The solution that worked for me is no. 6 here. It is also the simplest and does not involve connecting leads to the battery or the phone. All you have to do is use built-in NOR to boot from. Do the following:

  1. Plug in the USB charger and wait for a short blink of the AUX button LED (there might be repeated blinks, this means that there is not enough power to boot)
  2. Press and hold the AUX button (red square button on top left of the phone)
  3. While holding AUX press the POWER button (round button next to USB connector)

You may also do the following (alternative):

  1. Press and hold the AUX button (red square button on top left of the phone)
  2. While holding AUX connect the USB cable
  3. While still holding AUX press the POWER button (round button next to USB connector)

Note: The NOR memory is read-only and will only let you boot from phone memory or first partition in the SD card. If you have made changes to the boot loader (or maybe installed a different boot loader like Qi) they will not appear here, because those changes are saved into the NAND memory. The NOR copy of the boot loader cannot be modified. However this should let you boot *some* OS (in my case the built-in OM2008 which I never removed) so that you can charge the battery.

Note about charging when powered off

Actually I usually do recharge my freerunner when it is powered off, I usually plug in the USB charger when the OS is running, then I power it off. The phone will continue charging, the battery looks completely charged on next boot. But apparently this does not work when the battery is completely empty, or at least not all the time. Furthermore plugging the USB charger when the device is off causes automatically boot of the first partition, that is the reason why I use the above sequence (plug first, then switch off).

In a few occasions I was able to recover an empty battery by simply letting the phone plugged in when off. After an hour or so the phone can boot. This doesn't seem to happen regularly, perhaps not when the battery is really empty.

 

LabVIEW Hide Scrollbars in Subpanel

Print PDF

When we insert a VI inside a Subpanel on another VI's Front Panel we might not want to show the horizontal and vertical scrollbars at the side of the subpanel.

In LabVIEW 7 or earlier we could right-click the subpanel and enable/disable scrollbars. In later versions the internal management of scrollbars has changes, so the option is no longer available. Instead we need to see the property (scrollbars on/off) in the VI the subpanel will load. There are many ways to do this (for example VI Properties from File menu), a very handy one is right-click on the scrollbar in edit mode (front panel). Here we can choose whether we want to hide scrollbars all the time or only when running. Independent controls are available for horizontal and vertical.

 


Page 3 of 5