From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Case Structure / Timer

Solved!
Go to solution

Hi

 

Please can anyone out there help me with my issue? I am totally lost and could use the insight from you guys.

 

Thanks

0 Kudos
Message 11 of 23
(1,073 Views)
Solution
Accepted by topic author goldfronts1

Try this as a starting point. (LV 9.0)

 

It does what you say you want (send x40, wait and display the elapsed time, send x41), nothing else. Modify as needed.

 

Of course it does not make a lot of sense to configure the serial port with every call. That shold be done elsewhere exactly once. Now you can also eliminate all these connectors.

Message 12 of 23
(1,069 Views)

To start the elaspsed time do I need a start button or does it start as soon as the target time is inputed?

 

Also, I'm not sure what you mean by "Of course it does not make a lot of sense to configure the serial port with every call. That shold be done elsewhere exactly once. Now you can also eliminate all these connectors"?

 

Thanks

0 Kudos
Message 13 of 23
(1,055 Views)

@goldfronts1 wrote:

To start the elaspsed time do I need a start button or does it start as soon as the target time is inputed?

 


Don't ask me, just run it and see! The time starts as soon as you call this subVI. I assume you have a nice UI state machine in the main VI and that the target time is determined when you call this subVI with the approrpiate time value wired to one of the connectors.

 


@goldfronts1 wrote:

Also, I'm not sure what you mean by "Of course it does not make a lot of sense to configure the serial port with every call. That shold be done elsewhere exactly once. Now you can also eliminate all these connectors"?


If you configure the serial port once in the main VI, all you later need to wire to the subVI is the visa connection. Close the serial port as the last step when closing the main program.

Message 14 of 23
(1,050 Views)

 

No I do not have a main vi. Sorry for your frustration with me. But when I run your vi I get an error message: Error -1073807343.

 

I don't want to have to call any sub vi's. I really just want to be able to enter in a time. Hit a start button that sends a 40 to the system to open the shutter and at the instant that the shutter is open, count down the time. Once the time has elasped, send a 41 to the system to close the shutter.

 

I thought my original vi did this, but I am having an issue with the start button starting the timer when clicked and sending a 40 to the system simultaneously. Also, once the timer has elasped I want the system to send a 41 to close the shutter.

 

Sorry for not being able to write this vi more elegantly but this is how I understood it to work. 

 

Any suggestions, on implementing my current vi to do the above would be great, as the learning curve for creating a whole new vi is very high for me.

 

Thanks

0 Kudos
Message 15 of 23
(1,037 Views)

Did you even bother to see what that error message meant? It meant it is trying to communicate with a port that does not exist. The default port in the posted VI is COM4. Try changing that to your port and running the VI again. This will do exactly what you want.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 16 of 23
(1,032 Views)

Error -1073807343 occurred at an unidentified location

Possible reason(s):

VISA:  (Hex 0xBFFF0011) Insufficient location information or the device or resource is not present in the system.

 

What do you have entered in the VISA resource name control?  The error says that whatever resource you are using doesn't appear to exist on your PC.  What com port are you trying to use?  Does it show up in Windows Device Manager?  Does it show up in Measurement and Automation Explorer?

Message 17 of 23
(1,031 Views)

Yes, I bothered. Why do you guys need to be so rude to newbies asking questions. Everything is not always so obivious to everyone.

 

You guys are a great help, I love this forum, but sometimes you need to learn patience with people.

0 Kudos
Message 18 of 23
(1,026 Views)

 

 

0 Kudos
Message 19 of 23
(1,021 Views)

@goldfronts1 wrote:

Yes, I bothered. Why do you guys need to be so rude to newbies asking questions. Everything is not always so obivious to everyone.

 

You guys are a great help, I love this forum, but sometimes you need to learn patience with people.


My apologies. Sometimes it appears that folks post the most basic questions here without doing some work on their own first. Those of us posting here are doing so on our own time and on a voluntary basis. It can get frustrating to see questions which are very basic and could be answered with a little bit of effort. This may not be the case for you but the simple statement "I got this error message" appeared you didn't try to understand what that error actually meant.

 

After reading literally 1000s of posts and seeing things like this can make one a little frustrated. Sometimes this results in a terse answer to someone.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 20 of 23
(1,018 Views)