03-10-2015 02:10 PM - edited 03-10-2015 02:10 PM
Nah, don't mark mine as the solution. It was mentioned before my post. Maye a kudo for being on the right track, but not as the solution. (There were other good suggestions also and you can actually have multiple solutions marked.)
07-26-2019 01:09 PM
This simply doesn't work I have a huge block diagram of simple state machine, I've tried to do this to save me time but I think is even worse, simply locks my tool in wire and it doesn't let me move freely through the diagram, I have very hard time, spent hours to wire my diagram.
07-26-2019 01:24 PM
@jalex0906 wrote:
I have a huge block diagram of simple state machine...
A simple State Machine should not have a HUGE Sequence Structure in it. You might want to consider setting each of those frames into their own state. You should also consider turning some of the larger chunks into subVIs to shrink down your diagram.
@jalex0906 wrote:
I've tried to do this to save me time but I think is even worse
What are you referring to as "this"? If you are referring to the Linked Tunnels, you just have to get them set up once and it is ready to go for any cases you add. I never had issues with them, even in my larger VIs.
07-26-2019 01:26 PM
@jalex0906 wrote:
... I have a huge block diagram of simple state machine ....
That's the first problem. You should need a huge block diagram for a simple state machine. Looking at your picture, you have a flat sequence structure inside your "Prueba" state. I bet some of those frames could be combined. And if there needs to be a distinct separation between those frames, then they should be in their own states. Some of them look like they belong in an initialization state.
How many screens wide is your VI? Do you have the Navigation Window open? I find that for the larger the VI, having the navigation screen open will cause screen refreshes and scrolling to be slower and slower. Every move of the block diagram on screen causes the need for LabVIEW to recalculate and refresh the way the navigation window shows the entire block diagram. Closing it will cause an immediate speed up in block diagram scrolling speed.
@jalex0906 wrote:
This simply doesn't work ... I've tried to do this to save me time but I think is even worse, simply locks my tool in wire and it doesn't let me move freely through the diagram, I have very hard time, spent hours to wire my diagram.
What exactly is "this" you are referring to in the thread? What does "simply locks my tool in wire" mean?
07-26-2019 01:28 PM - edited 07-26-2019 01:29 PM
resurrecting a 4 your old post just to complain about your poorly structured code?
If you have a "STATE MACHINE" why-oh-why do you have a sequence structure?
BTW. The "locked wire tool" is LabVIEW asking which tunnels to link together.
edit: Wow I was really slow. LOL
07-26-2019 02:06 PM
Your VI is simply too big to edit properly. As others have mentioned, get rid of the sequence structure and either move those frames to your main state machine or create a new state machine(s) inside your main state machine to handle specific tasks.
A trick I use when I know I'll be adding new cases is to create a dummy case that just has all the shift registers wired across. Then when I need a new state, I duplicate the dummy and it's already wired. I will even add some extra shift registers at the bottom that do nothing. If I need a new one later I just drag it up and use it. Its already wired through every case.
08-07-2019 11:53 AM
Hi RavensFan thank you for your response, Yeah for sure I need to make a state for every code contained in the flat sequence structure, the problem here is what happens if it still being to big?
08-07-2019 12:00 PM
Hello NIquist:
Thank you for your tips I'm on it...for sure it will work, however I still having doubt about what wil happen if my code still to big.
Greetings From Mexico
08-07-2019 12:02 PM - edited 08-07-2019 12:07 PM
A block diagram being too big isn't going to affect how well your code executes. But code that is too big that you can't functionally maneuver in it, or understand what is going on, or be able to make the inevitable changes to it when someone asks to have a new feature added, means it is impossible to maintain and risks breaking if you try to change something.
If you still have problems working with your code when it is still too big after re-working it, then it means you still have a lot more rework to do, or need to scrap it all and rethink your overall architecture.
PS: My message 14 should have said "You should NOT need a huge block diagram for a simple state machine."
08-07-2019 12:27 PM
@RavensFan wrote:
A block diagram being too big isn't going to affect how well your code executes.
Actually, it does. If the complexity is very high, the compiler will skip some optimizations to save compile time, resulting in less efficient code overall.