LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Timer

Here is your VI, saved in LabVIEW 2019.  

 

The Good News is that you used an Enum to drive your State Machine (I do the same thing -- I prefer Enums for this purpose), and, even better, you created a TypeDef for your Enum (so you can reuse it).  Did you put your VI and your Enum in a LabVIEW Project, perhaps contained in a File Folder?  The Bad News is that you forgot to include the Enum definition in your submission!

 

When you have a LabVIEW Project, and it is contained in a Folder (to keep its files from getting mixed up with other LabVIEW files), you should Compress the Project Folder and attach the resulting .ZIP file.

 

But don't worry, I was able to re-create the Enum, and have included it here as a Front Panel control called "Enum".

 

I'll let Gert take it from here.

 

Bob Schor

Message 11 of 16
(928 Views)

I don't quite understand what do you mean, but thank anyway. I don't know if you are talking about LabView control file because LabView asked me to save it. Here it is. 

0 Kudos
Message 12 of 16
(919 Views)

OK, there are plenty of glaring errors.

 

  • All inner loops need to disappear
  • Your "Enum" should also link to the type def. (It also contain an extra blank item.)
  • Your ctrl also need to be downconverted to 2020. It should already be in the new folder when you made the 2020 version of the program.
  • You have all these array diagram constants for target times and they only contain one element. unless your are in state #0, you'll get zero because the state is used as index. You need exactly one array of times before the loop containing one element per state. Some can be zero if they are not used.
  • ...
0 Kudos
Message 13 of 16
(905 Views)

Can you show me how to fix the problems, you can use my VI. 

0 Kudos
Message 14 of 16
(895 Views)

@Altenbach -- the "Enum" is mine.  I down-converted the OP's code, which was posted without the attached Control; I created it from "inspection".

 

Bob Schor

0 Kudos
Message 15 of 16
(888 Views)

You can do something like for a your timer. Now you need to integrate it into your state machine.

 

Timer.png

0 Kudos
Message 16 of 16
(843 Views)