Is my math right?

Just want to post back up and say i worked on this for an a little over an hour and got the program done and the PV setup. I downloaded it and it was a HUGE success. The meter gives me a pulse evry 3 pounds and my pulse width is 30ms. My lb setpoint is divided by 3 and placed into the pulse setpoint and my gallon setpoint is multiplied by density variable and then divided by 3 and that becomes the pulse setpoint. I only got to run 1 test but it worked perfectly.

the way i figure, my max will be 300 GPM with a density of 8. i will be at 1 pulse per 75ms. with a pulse width of 30ms, i think i will be fine.


everything look ok?

Thanks again for your help.
 
Kurt, just so you don't have to suffer this again next time.

Research how to use an STI program file, and put all your pulse detection/counting in the STI routine. It is the ONLY way you can guarantee seeing all the input pulses. Without an interrupt file, imagine if there was a conditional iterative loop in the code that stretched the scan time excessively, your input could have gone on and off several times.

mgvol suggests you consider using IIM, I suggest you MUST use it in your interrupt routine, otherwise the code is just going to look at input data updated at normal scan rates.

Your STI execution interval should be significantly less than your minimum pulse ON or OFF time, preferably about a half. Oh and don't forget to one-shot your input so you only count pulse transitions once, or use a counter to count the pulses (a counter has an inbuilt one-shot on its CU enable input).

HTH
 

Similar Topics

Hey guys, I'm programming this stepper motor to go back and forth at two set angles. After programming, I realized that my program only works when...
Replies
8
Views
2,305
here we go, trying to get this right i want to add 15 to a number in v7770 (Realtime Clock minutes) and store it in v2548 (User storage so i can...
Replies
8
Views
3,100
I have an expression in a structured text routine of a Logix controller that looks more or less like the following: ResultInteger := Integer1 *...
Replies
13
Views
395
This application has a motor with encoder feedback that drives a linear actuator that moves in/out, and is at roughly 45 degs from horiz. As the...
Replies
19
Views
1,372
Hi all. First time programming a machine of this type. A center driven unwind feeding to a center driven rewind. No dancers or load cells, just...
Replies
37
Views
4,903
Back
Top Bottom