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: 

Relay timing

Hey guys,

 

I have  build a small program to control 8 relays on a conrad relay card. 

Individual relays are controlled by sending commands with 19200 Baud without handshake signals, 8 data bits, without parity bit and with one stop bit. 

The programs shown works perfectly if individual relays need to switched on/off.

Now i would like to add a timing function i.e. controlling the timing of individual relays based on user input. 

Any suggestions on how to go about it would be appreciated.

Thanks 

0 Kudos
Message 1 of 4
(2,841 Views)

Hello,

 

Try to refactor your code into State Machine:

http://www.ni.com/tutorial/7595/en/

 

It will help you to manage timing properly 🙂

 

Marcin

              

Think Dataflow - blog.mtapp.tech
0 Kudos
Message 2 of 4
(2,817 Views)

Use State Machine Architecture for your application and for controlling Timing you can use Elapsed Timer.

 

http://www.ni.com/tutorial/7595/en/

 

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 3 of 4
(2,814 Views)

Hi Zezendapus,

 

Could you please upload the vi for Labview 2012? I have the same issue and would like to give it a look but with the old version of labview that I have.

 

Thaks in advance.

Vanessa

0 Kudos
Message 4 of 4
(2,105 Views)