Switch Hardware and Software

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help opening and closing the relay for temperature using the SCB-68+6024E

I have a vi that I need help finishing, We are generating a power supply to heat up an element, I need to be able to open a relay heat the element to a temperature (measure with theromocouple K) when temperature reaches desired temp, I need to turn on pulse train, when pulse count reaches end, I need to turn off the heating element. I would also like to be able to use a start and stop button instead of having to us the arrow, Can someone look at my code and let me know if I am going in the right direction and give me some pointers.
0 Kudos
Message 1 of 5
(6,738 Views)
Hello,

Thank you for contacting National Instruments.

What you really need for your application is a state machine architecture. A state machine structure will allow you to make decisions in your code and transition from one state that performs one action to another state to perform a different action.

I have attached a simple state machine example below. Each state has a number. A case structure, while loop, and shift register are used to transition from one state to another.

Regards,
Bill B
Applications Engineer
National Instruments
0 Kudos
Message 2 of 5
(6,738 Views)
I have done this, my problem is the relay to control the power supply. I need the relay to release 5 volts and stay on until the pulse count passes to last state then I need to turn the relay off. Can you look at what I have done and tell me what I am doing wrong.

Thanks Sherry
0 Kudos
Message 3 of 5
(6,738 Views)
Hello Sherry,

I have made some modifications to your VI. Please take a look at what I have done. You should be able to get things working now with what I modified.

Bill
0 Kudos
Message 4 of 5
(6,738 Views)
Thanks Bill, this helps.
My question is why did you change it to analog instead of digital? On my SCB-68 box I had it wired to the 18 and 52 which is DO0. Do I need to change this in my box or change the program to digital? And as for the on/off wired to the front of the while loop, I was trying to create a Run/Start.
0 Kudos
Message 5 of 5
(6,738 Views)