Micrologix 1500 & Panelview 300, Displaying Info

donl517

Member
Join Date
Dec 2005
Location
Michigan
Posts
127
I have some data that I need to display on the panelview 300. It is in the format 00.00 I tried N7 but it does not allow for the decimal point. I tried ST as an integer but it is showing the number of characters in the string, not the string. What is the best way to display this info?

TIA,
Don
 
use scale & offset in the tag editor, if you want to display 20.03

your n7:0 has 2003 then enter 0.01 in the scale 0 in offset, then select no of decimal point in numeric entry to 2
 
If the original data is in an N7 register then do the following when defining the contents of a control:

1. Set 'Field Width' to 5
2. Check 'Fixed'under Decimal Point
3. Set 'Position' to 2

Then in the 'Edit Tag' section - besides entering the location of the tag:

1. Set 'Scale' to '.01'
2. Adjust 'Max' to '99.99'
That should display as you wish.
 
I have tried some of these but I think I left something out or was not clear. I have a string of data coming in:

A:10.68,B:15.5005,C:6.26122,D:-18.10602,E:-1.38278,^M^J

I am using search to find each of the alpha characters and then adding 2 (or 3 to ignore the - sign) to that value and then extracting the first 5 digits of the value of each alpha character to an ST register.

When I take the value to N7 it ignores everything to the right of the decimal. So I tried to display directly from the ST register but that is not working. I tried Float to display the data. I tried getting the data into F8 but everything I try is invalid.

So how do I take 10.68 that is in the ST register and get that to display on the Panelview. Sorry if I am missing something simple here.

TIA,
Don
 
Aha, you have data coming in as a string? It appears that you are storing ASCII characters rather than actual numeric values. You can use the ACI instruction to convert the string to an integer. Then you will have to manipulate the integer with some math to convert it to a floating point value with the decimal point in the right place.

Someone correct me if I'm wrong.

$
 
OK, I have made a little progress on this, My internet was down all day yesterday so I did what I could.

In LAD 8-Data I am using MOV to get the data from the ST register to the F8 Register but I am not getting the results I had expected. Any Advice? See Attached.

Thanks,
Don
 
Once you extract "A", search for the decimal, then move the characters to the right of the decimal into another string, String-1. Move the characters to the left of the decimal to yet another string, String-2. Use the string to integer instruction to convert String-1 to an integer, then move String-2 to another integer. Divide String-2 by the number places to the left of the decimal. That is if you have 3, divide by 1000, for 2 divide by 100, store this in a Floating point, the add the interger from String-1, store the results in a Floating point.

It's a very drawn out method, and will require a lot of ladder coding, but it can be done.
 
Ken Moore said:
I would use indirect addressing and a for next loop, that way you only have to write the extraction/conversion code once.

Do you have an example of this by chance?

Thanks,
Don
 

Similar Topics

I have been working on this for a while now and I can't seem to get it. I was finally able to view the 1500 on the PanelView under the serial...
Replies
1
Views
100
Hello, Well, after fighting thru comm and cable issues from pc to panelview and pc to plc finally communicating with each separately. I have...
Replies
20
Views
17,863
Hey guys! I need to communicate a PV550 with a Micrologix 1500 ASAP, but the 1761-NET-AIC doesn't seem to be working. I was wondering if the...
Replies
4
Views
5,238
So I figured I'd start off by saying I love this place. I never registered, but frequent this place often to read up on the little tricks to get...
Replies
2
Views
3,351
i have a mircologix 1500 lrp using df1 on channel 1 and i want to talk to a panel view plus using df1 drive i need the pin outs to make a cable...
Replies
1
Views
1,473
Back
Top Bottom