Electrical measurement department of VSB-Technical University has been involved for more than 14 years in research and development of power quality analyzer built on virtual instrumentation technology. PC-based power quality analyzer with National Instruments data acquisition board was designed and developed in this time frame. National Instruments LabVIEW is used as the development environment for all parts of power quality analyzer software running under MS Windows OS. Proved PC-based firmware was ported to new hardware platform for virtual instrumentation - National Instruments CompactRIO at the end of 2007. Platform change from PC to CompactRIO is not just code recompilation, but it brings up many needs for specific software redesigns. Paper describes how the monolithic executable for PC-based instruments was divided into three software layers to be ported on CompactRIO platform. The code for different parts of CompactRIO instrument is developed in a unified development environment no matter if the code is intended for FPGA, real-time processor of PC running Windows OS.