I know there are many other ways to accomplish this, But I have to use parts on hand. to make it easy for others to service. So here is my criteria.
1. A standard loadcell 10kg +10v excitation
2. Dl-05 PLC w/ H0-CTRIO-2(A Dl-06 will not fit otherwise I'd use float numbers)
3. Signal conditioner converts loadcell to frequency. 100Hz@0v, 10KHz@50Mv.
I used another PLC using float numbers for the math and the results were accurate until the frequency exceeded the limits for the PLC so I abandoned it.
Here is a description of the code before I post it. I set up the CTRIO to count the pulses and a 99Ms interrupt that loads the current count in the accumulator, and out to a v-number I will preform the math to display weight. The scan time for those operations is close to 1Ms for a total of 100Ms.
Here is my dilemma, since the DL-05 can only handle BCD or binary, the description in the manual says " The first part of the quotient resides in the accumulator and the remainder resides in the first stack location." so how to access the remainder?
Here is the code I have so far..
I haven't put in the math for the loadcell calculations yet since I need BCD to act like floating numbers but cannot do that yet. but here is what I have that worked on my other program
Any help would be appreciated
1. A standard loadcell 10kg +10v excitation
2. Dl-05 PLC w/ H0-CTRIO-2(A Dl-06 will not fit otherwise I'd use float numbers)
3. Signal conditioner converts loadcell to frequency. 100Hz@0v, 10KHz@50Mv.
I used another PLC using float numbers for the math and the results were accurate until the frequency exceeded the limits for the PLC so I abandoned it.
Here is a description of the code before I post it. I set up the CTRIO to count the pulses and a 99Ms interrupt that loads the current count in the accumulator, and out to a v-number I will preform the math to display weight. The scan time for those operations is close to 1Ms for a total of 100Ms.
Here is my dilemma, since the DL-05 can only handle BCD or binary, the description in the manual says " The first part of the quotient resides in the accumulator and the remainder resides in the first stack location." so how to access the remainder?
Here is the code I have so far..
Code:
sp0-------Ctrio config box input v2000-v2025 output v2030-v2061
sp0------ld k10 out v500
sp0------ld k40 out v7633 ld k994 out v7634 ENI
sp1------ldd v4000 muld v500 outd v4002
end
int
sp1------ldd v2000 outd v4000 OUT(b2054.1)'reset counter
IRT
Code:
(((FREQ*50/)10000)/10)=MV
((MV*22.0462)/20)=Scale Weight in Lbs.