Sign in to follow this  
Followers 0
308

Transfer numerical content from touchpanel to ML1500

7 posts in this topic

I am using a Proface GP2500 with a ML1500. I need to transfer values from the touchpanel entered using numerical keypad on the touchpanel to the PLC. Let's say if the value entered using the keypad is 100. I need to take this value and multiply it by 100 and then divide the result to 5 and added with 7. The result is going to be used as the preset value of an UP counter. This means, everytime a new value is entered from the touchscreen numerical keypad, the counter preset value will also change. My question is, how can I do this? Thank you.

Share this post


Link to post
Share on other sites
Try this math functions in the ML1500 itself & copy the final value to the counter preset I am not sure that GP2500 supports math expressions.

Share this post


Link to post
Share on other sites
how should i write the program to make it able to copy the final value to the counter preset?

Share this post


Link to post
Share on other sites
Result of the math function should be transfered to the counter preset by using MOV inst to C5:0.PRE Note:- value to the counter preset should not exceed 32767

Share this post


Link to post
Share on other sites
i see. thanks a lot. one more thing, how can i take the values keyed-in from the touchscreen so that it can be used to perform math operations? and how can i display the result on the touchscreen?

Share this post


Link to post
Share on other sites
1. The PRESET of a counter in a ML1500 is a 16 bit Integer. The counter can only use the positive portion of what can be a signed number. Thus the preset is limited to 0 - 32767. 2. Integer storage (when being used for general numbers) is in an 'N' file. the default file is labeled 'N7'. It can hold up to 256 integers. These individual integers are labeled 'N7:0' to 'N7:255' 3. The ML1500 can perform standard mathematical operations on integers. Each operation is contained in a box which has the name of the mathematical operation and holds the names of two operands and the named space for the result. If you wish the result space can be the same as an operand. 4. The display will do all the 'work' in sending an entered number to the PLC. When you create the entry space on the display a piece of information you will enter will be the destination register in the PLC. You will probably be using one of the 'N7' locations. 5. The display can also do the work of retreiving the value of an integer and displaying it. In fact your numeric entry space mentioned above may probablyl be reading the current value of your target space for reference. Again, a purely numeric display will just have the location of the space inside the PLC from which to retrieve the number. You wioll probably be presented with the opportunity to show the retreived number in a scaled fashion and with a positionable decimal point. I know this is fairly basic information but pieces of it may fill in a gap in understanding. Edited by b_carlton

Share this post


Link to post
Share on other sites
Thanks a lot people. I've begin to understand the basic concept now. You have been a lot of help. I will post some more is any problem occurs. Thank you.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0