Jump to content
  • 0

Loop rate is slow


Craig Cloud

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.

Link to comment
Share on other sites

11 answers to this question

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...