04-01-2016 07:09 AM
04-01-2016 07:29 AM
I can't see your VIs as I don't have LV 2015 but did you read this article under 'Can all functions and structures be used inside the SCTL?', you might also have some timing restrictions if the logic inside your SubVI can't be completed in a single cycle. The obvious one that sticks out is if your SubVI has a divide, quotient/remainder or performs some SGL floating point operations.
04-01-2016 07:32 AM
Thanks. I did read that article and I don't think I have anything listed in there. My code ran before I put it in the for loop (I was doing one speed before and now I want to do 3).
04-01-2016 07:35 AM
Does the error occur some time into the compilation, or as soon as it starts generating the intermediate files? If it's the first one, it might be that it just can't run that much logic in one clock cycle.
You could try:
- turning on parellelism on the for loop
- index the items from the array into separate instances of the SubVI to allow them to run in parallel
04-01-2016 07:48 AM
I can't turn on parallelism, it won't let me even start the compile.
I could index the arrays and remove the for loop, but I would rather not if I don't have to. It wouldn't be too bad in this instance, but for future developments it would be nice to know if I can do it with a for loop.
04-01-2016 07:53 AM
Ok, if you can't turn on parallelism, then it means that LabVIEW has to run the operations sequentially (one after another), this probably means it takes more time than can be completed in a single cycle - hence your compilation errors.
You will have to make the operations happen in parallel (e.g. by splitting the array, doing the operations in parallel and then recombining) for it to have a chance of completing in a single cycle.