ScottTheEngineer
Member
Greetings.
ok, I'm trying to install a bar graph on a PV600 reading values from a Micrologix1500.
AHA!!! just go to :http://www.plctalk.net/qanda/showthread.php?t=15069&page=1&pp=15&highlight=scale
And you will easily be able to figure this out. Nope.
Excellent info though. I've gotten pretty far with it I think. And I'm almost over the hump.
However my problem has a bit of a twist to it.
I have an analog input from an LDT that reads in a very limited range. 10000 to 7000 counts (backwards). My problem is that I have 12 machines using the same equipment and they all have different values between 7000 and 10,000. The resolution I'm looking for is +/- 20. So an LDT reading 8000 at center would have a low limit of 7980 and a high of 8020, the one next to it reads 9000 nominal with a Low and High of 8980 and 9020
I want to capture the 7980 to 8020 area with the entirity of the bar graph.
So far my logic looks like this:
Data table
Input I:1.0
Low LDT reading (X1) =F58:31
High LDT reading (X2)=F58:30
Y1=0
Y2=100
M/rate= N99:0
Ouput to PV= N99:1
-------------Sub--------------------------
|SourceA: F58:30 |
|SourceB: F58:31 |
|Dest: F58:55 |
|---------------------|
| |
|-------DIV-----------|
|SourceA: 100 |
|SourceB: F58:55 |
|Dest F58:56 |
|---------------------|
| |
|-------MUL-----------|
|SourceA: F58:56 |
|SourceB: 10,000 |
|Dest N99:0 |
|---------------------|
| |
|------SCL------------|
|SourceA: I:1.0 |
|rate(/10000): N99:0 |
|Offset 0 |
|Dest N99:1 |
|---------------------|
| math |
| error reset |
| S:5/0 |
|-------( / )---------|
The problem I'm seeing revolves around, I believe, the floating point to integer coversion value.
the SCP instruction isn't available in the 1500 although I think this should work just fine.
I'm getting incorrect values in my N99:1.
I'm looking to scale between 0 and 100
Where am I going wrong?
ok, I'm trying to install a bar graph on a PV600 reading values from a Micrologix1500.
AHA!!! just go to :http://www.plctalk.net/qanda/showthread.php?t=15069&page=1&pp=15&highlight=scale
And you will easily be able to figure this out. Nope.
Excellent info though. I've gotten pretty far with it I think. And I'm almost over the hump.
However my problem has a bit of a twist to it.
I have an analog input from an LDT that reads in a very limited range. 10000 to 7000 counts (backwards). My problem is that I have 12 machines using the same equipment and they all have different values between 7000 and 10,000. The resolution I'm looking for is +/- 20. So an LDT reading 8000 at center would have a low limit of 7980 and a high of 8020, the one next to it reads 9000 nominal with a Low and High of 8980 and 9020
I want to capture the 7980 to 8020 area with the entirity of the bar graph.
So far my logic looks like this:
Data table
Input I:1.0
Low LDT reading (X1) =F58:31
High LDT reading (X2)=F58:30
Y1=0
Y2=100
M/rate= N99:0
Ouput to PV= N99:1
-------------Sub--------------------------
|SourceA: F58:30 |
|SourceB: F58:31 |
|Dest: F58:55 |
|---------------------|
| |
|-------DIV-----------|
|SourceA: 100 |
|SourceB: F58:55 |
|Dest F58:56 |
|---------------------|
| |
|-------MUL-----------|
|SourceA: F58:56 |
|SourceB: 10,000 |
|Dest N99:0 |
|---------------------|
| |
|------SCL------------|
|SourceA: I:1.0 |
|rate(/10000): N99:0 |
|Offset 0 |
|Dest N99:1 |
|---------------------|
| math |
| error reset |
| S:5/0 |
|-------( / )---------|
The problem I'm seeing revolves around, I believe, the floating point to integer coversion value.
the SCP instruction isn't available in the 1500 although I think this should work just fine.
I'm getting incorrect values in my N99:1.
I'm looking to scale between 0 and 100
Where am I going wrong?
Last edited: