Example Programs

cancel
Showing results for 
Search instead for 
Did you mean: 

Silicon Labs USB MCU Library

Overview

    This is a LabVIEW 2012 library for the USBExpress driver for Silicon Labs USB MCU's.

 

Description

    It wraps all the functions contained in the USBXpress dll in order to create LabVIEW VI equivalents. The Context Help and VI terminals are populated from the SiLabs Programmer's Guide, so the library is fairly well documented.

 

Requirements

    Software

    LabVIEW 2012(or compatible)

 

Hardware

    NI-DMM Device

 

Steps to Implement or Execute Code

    To install, unzip into the LabVIEW 2012\user.lib\ directory. The VI's will appear under User Libraries in the Functions palette.

 

silabs.jpg

 

**This document has been updated to meet the current required format for the NI Code Exchange.**

 

** 12-08-2019, Rolf Kalbermatter, A new VI library has been attached "Silicon Labs USB MCU's LV2012 Corrected.zip" that changes the Read and Write functions to work. The previous were purely Import Library Wizard generated wrappers not handling the buffer parameters in a way that could even work. I don't have any hardware to test it but the previous functions could never have worked at all. I also took the liberty to clean up the other functions and correct the error status handling to something useful. **

Ben

National Instruments
Certified LabVIEW Associate Developer
Certified TestStand Developer
Comments
Member Tektronix TDS754C
Member

Very Cool.  I was having concerns about needing to learn C in order to run C Code in LabView.  SI Labs

has all of its example coding for serial communication in C Code Examples.

Thanks so much

Member Valentin87
Member

 Please explain how to connect for example to CP2103?

Member mujat
Member

Does anybody know the meaning of the SI_STATUS output of these vi's? I see numbers like 0, 1, 6, 255.

Thank you.

Member david.chang
Member

Hi Ben,

is you VI lib works for all silicon labs USB MCU? I am working with C8051F380, when I use "SI Get Num Devices.vi", the return status is 255. what does that mean?  can you advice how to get start to use your lib to communicate with USB devices. 

 

Rgds!

David 

Member mehrarajat13
Member

Hello

I am using c8051F381 controller and SI Get Num Devices.vi is working properly, SI Open.vi also working fine but when I try to write I receive code 6 as the SI_Status which according to the Datasheet is SI_INVALID_PARAMETER.

Please anybody help me how make this SI Write.vi and SI Read.vi work properly.

Si_prob.png

Proven Zealot Proven Zealot
Proven Zealot

Use the "Silicon Labs USB MCU's LV2012 Corrected.zip" archive instead. The VIs in the other two archives are basically the direct output from the Import Library Wizard and this Wizard can despite its name no magic. Getting automatically a fully working library from the limited information present in a header file would be a real magical feat. Every Import Library Wizard generated VI library needs to be carefully reviewed and reworked to do the right thing(TM).

Rolf Kalbermatter
Averna BV
LabVIEW ArchitectLabVIEW ChampionLabVIEW Instructor
Member siiilverrr
Member

 

Hello everyone! First of all, please forgive me for my bad english, but I need help. I have installed new version of library of VIs, but I cant understand how can I send message "0x33" by "SI Send.vi", if input is numeric array(called Buffer)? If it could be a string or numeric I'd understand, but it's not. I have tried to do this, but it's not working. 

-Thank you all for your attention!