0

How to link a screen button to logic in MC controller?

Deanne 2 years ago in IQANdesign updated by Gustav Widén (System support) 2 years ago 4

Is there a way to link a screen button to logic located in the MC? Example, I am trying to integrate a "manual mode" in my program. I want to be able to press a button on the screen to enable/disable manual mode. Once manual mode is enabled, you can manually change the current value being sent to a motor.

I hope I'm not misunderstanding the question, but if I need a manual/automatic button I add a virtual digital channel in the main Application logic, calling it, for example,"ManualOrAutomatic" and in its channel Property's I'd turn on the Toggle capability.

In the display Id add a Text Button Control and in its channel Property select the action to be the virtual digital channel you created earlier.

Ive attached a project showing this as an IDSX  file so its small in size.I've also added 2 buttons that have different text depending on the state of the virtual digital channel. To use you put the buttons over the top of each other and only one of the buttons at any time will be visible.

Is that what you meant in your question?

Andy

VirtualDigitalExample.idsx

This is possibly a question regarding a multi-master system since there is mention of a screen and MC? which would be a master controller. There would need to be a CAN connection set up between these modules, both physically and in IQANdesign, either J1939 or a Master-bus:

Image 3370

Image 3371

IQAN will only let you define the Virtual digital in, in the display its used on.

If you want to be able to have a on-screen button but have the channel directly defined in the MCxx then you can use a digital parameter with the switch control screen item. I believe in this case it uses the diagnostic bus.

For a mode change, another idea could be to use a State Parameter in the MC4x application. Just as with the Digital Parameter that mdonaldson suggested, this is an adjustment sent over the Diagnostics bus. 

An advantage of using state- or digital parameter is that you can makes these access protected with a PIN code. (but you'll need to go via an adjust group for this)

A disadvantage with DP and SP is that parameters aren't as easily reset. To add an automatic reset, you could make the adjustment on a MEM channel instead, see solutions library example: 

Image 3435



A word of caution when it comes to sending VDIN from a Master Display, for anyone else finding this post. 

This application here seems to be about a mode change for development or service, where I assume local inputs and application logic on the MC manage start and stop conditions. But I have seen other cases where designers wanted to use a virtual button for commanding movement. The VDIN is not intended to for direct motion control.