Jump to content

Recommended Posts

Posted
Hi All I need a hand here as I have been racking my brain and cant come up with the final solution. I am using a 1455 HMI to a FX3GE PLC. I have a 20 character ASCII input that I am using for our recipe names. Each name is loaded in a base D reg (10 registeries) then moved to the appropriate R register with a BMOV. My issue is I want the ASCII input to excute the the BMOV "save to memory" once you hit the enter button. Currently I am using a 16 bit compare command line but since I am only comparing the first data entry not all ten if the user doesn't change the first two letters it wont execute the save to memory. In the past on our older touch screens I have created a custom user keypad and made the enter button act as a multifunction switch. That works great but I really like the base ASCII keypad Mitsubishi has and since I dont have access to it via the library I cant edit the enter button in it. I have the ability in this screen to use Object scripts but I have liitle to no experience with them. So my question to you guys is how would you execute the BMOV once hitting the enter button? I do only wants this to occur once the enter is pressed. Is there a way to monitor the key code in the PLC to see when the write has been accessed? Help!
Posted
You should be able to do that with an object script. On the ASCII input object, enable the input script and make the trigger type "Input Fixation". Then write a script to set a bit on the PLC to trigger the block move.
Posted
Hi Jeremy, The enable, trigger type I am familiar with since I have been toying with it but I have very little experience with object scripts. I only worked on pure ladder enviroments do you have an example of a script to set an "M" bit? Or some good literatue to point me to. The FX Programmer manual nor the two GT Designer 3 manuals have any real good examples. Thanks Doug I was ablle to get my save sucess rate up by using a 32 bit mean value of the ASCII input and comparing it today but its 90% effective. What your describing is what I want to do and would be 100%, just lack of experience.
Posted
Simple answer is that all you really need is a single line in the script that looks something like this: set([b:M0]); Obviously, change the address from M0 to something that suits you. Once the bit has been set, then you can run some code in the PLC to do the block move and reset the bit. Might be good to have a slight delay to allow the ASCII data to settle in the PLC, on the off chance that the bit status updates before the data. If you want to dig into scripting deeper, there's a chapter on scripting in the Functions manual, which you can access from the help menu if you have the option installed. It's chapter thirty, and there are some programming examples. There are also some sample projects online that I downloaded at some point, though I can't remember where. The new Mitsubishi website leaves something to be desired in the downloads sections. If you just dive into the scripting, you'll see that all the available functions are listed, with decent descriptions of what they do. Though the best way to figure it out is to just try stuff. Start with the programming examples and go from there.
Posted (edited)
Thanks Jeremy I appreciate it Edit: For anyone looking at this. Make sure you enable Object Script under Option OS when you load your settings into your HMI. If you dont load it your scripts will not run. Edited by dougolupski

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...