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.
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.
07-09-2012 01:01 PM
Hi
Please can anyone out there help me with my issue? I am totally lost and could use the insight from you guys.
Thanks
07-09-2012 01:28 PM - edited 07-09-2012 01:30 PM
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.
07-10-2012 07:34 AM - edited 07-10-2012 07:35 AM
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
07-10-2012 09:42 AM - edited 07-10-2012 02:35 PM
@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.
07-10-2012 02:34 PM
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
07-10-2012 02:41 PM
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.
07-10-2012 02:42 PM
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?
07-10-2012 02:52 PM
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.
07-10-2012 02:56 PM
I don't have the device attached to my laptop. I am travelling right now and just wanted to test the vi. I guess I will have to wait until I get back to my lab to test this vi out.
Thanks
07-10-2012 02:59 PM
@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.