Question

Just received my Chipkit WF32.  Been playing with it using LabVIEW and I find that the loop speed is only 63 Hz when scanning a digital input (one of the push buttons).  The PIC32 chip runs at 80 MHz so this is way out of line.  What an I missing here?  I don't think  using LabVIEW would slow it down that much.

Share this post


Link to post
Share on other sites

11 answers to this question

Recommended Posts

  • 0

@[email protected]

I think you are confused.  a VI is a "Virtual Instrument" which is the name for a LabVIEW program.  I wrote a program in LAbVIEW and then ran it on the Chipkit WF32.  My problem is that the program is only running at a speed of 63 Hz.  

Share this post


Link to post
Share on other sites
  • 0

Hi @Craig Cloud,

I did find a few threads on Labview MakerHub's forum that talk about slow speed in the loop here and here. Our LabVIEW person has not yet come in today so you might not get a more experienced response on this forum until earlier next week. I would also suggest to reach out to the Labview Makerhub forum as well here. Also have you looked at this tutorialHere is a getting started with the chipkit WF32 and Labview tutorial as well.

cheers,

Jon

Share this post


Link to post
Share on other sites
  • 0

Hi @Craig Cloud,

I talked to @JColvin and it turns out that Labview makerhub linx has a built in error checking process with packets sent and received that slows down the loop speed. So one way to speed it up is to reduce the latency timer in the  device manager as shown below.  

device manager.jpg

device manager2.jpg

Edited by jpeyron

Share this post


Link to post
Share on other sites
  • 0

Depending on how your code is set up, you could also create what is known as a custom command in LINX. There is a Forum thread that walks through how to make one here as well as some documentation from LabVIEW MakerHub on it here.

The idea behind a custom command is that LabVIEW (LINX) would send out a single command (realistically this will still be 5 bytes or so thanks to the packet checking), but then all of the operations will be done on the system board (WF32, Raspberry Pi, etc) based on a function that runs through the procedure once it receives the command packet from LabVIEW. This helps prevent LabVIEW needing to send out multiple commands of read this pin, process this, send out this, process again, etc, and can just have the microcontroller do all of the processing at it's own faster pace and then send the result back to LabVIEW when it is finished. If you have a lot of back and forth between LabVIEW and the MCU, this can definitely speed up the loop rate by merit of simply not communicating as often.

The drawback with this is you'll have to do error testing and debugging on the microcontroller side rather than being able to do everything within a single environment, but you do get to potentially (again, depends on your application setup) speed up your loop rate.

I guess as a side note, you are not able to port your LabVIEW VI to the chipKIT boards like you are with the BBB and RPi's at this point in time (as you noted) so there isn't a nice way to get those sort of speeds as far as I know. Hopefully that will be able to be done in the future, but I'm not privy towards those sort of developments.

Thanks,
JColvin

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now