[phpBB Debug] PHP Warning: in file [ROOT]/includes/session.php on line 214: htmlspecialchars(): charset `ote class=/"wp-embedded-content/"><a href=/"https:////dramatrix.hu//vector-icons///">Vector Icons<//a><//blockquote>/n<script type='text//javascript'>/n<!--////--><![CDATA[////><!--/n/t/t!function(d,l){/"use strict/";var e=!1,n=!1;if(l.querySelector)if(d.addEventListener)e=!0;if(d.wp=d.wp||{},!d.wp.receiveEmbedMessage)if(d.wp.receiveEmbedMessage=function(e){var t=e.data;if(t)if(t.secret||t.message||t.value)if(!//[^a-zA-Z0-9]//.test(t.secret)){for(var r,i,a,s=l.querySelectorAll('iframe[data-secret=/"'+t.secret+'/"]'),n=l.querySelectorAll('blockquote[data-secret=/"'+t.secret+'/"]'),o=new RegExp(/"^https?:$/",/"i/"),c=0;c<n.length;c++)n[c].style.display=/"none/";for(c=0;c<s.length;c++)if(r=s[c],e.source===r.contentWindow){if(r.removeAttribute(/"style/"),/"height/"===t.message){if(1e3<(a=parseInt(t.value,10)))a=1e3;else if(~~a<200)a=200;r.height=a}if(/"link/"===t.message)if(i=l.createElement(/"a/"),a=l.createElement(/"a/"),i.href=r.getAttribute(/"src/"),a.href=t.value,o.test(a.protocol))if(a.host===i.host)if(l.activeElement===r)d.top.location.href=t.value}}},e)d.addEventListener(/"message/",d.wp.receiveEmbedMessage,!1),l.addEventListener(/"DOMContentLoaded/",t,!1),d.addEventListener(/"load/",t,!1);function t(){if(!n){n=!0;for(var e,t,r=-1!==navigator.appVersion.indexOf(/"MSIE 10/"),i=!!navigator.userAgent.match(//Trident.*rv:11//.//),a=l.querySelectorAll(/"iframe.wp-embedded-content/"),s=0;s<a.length;s++){if(!(e=a[s]).getAttribute(/"data-secret/"))t=Math.random().toString(36).substr(2,10),e.src+=/"#?secret=/"+t,e.setAttribute(/"data-secret/",t);if(r||i)(t=e.cloneNode(!0)).removeAttribute(/"security/"),e.parentNode.replaceChild(t,e)}}}}(window,document);/n////--><!]]>/n<//script><iframe sandbox=/"allow-scripts/" security=/"restricted/" src=/"https:////dramatrix.hu//vector-icons//embed///" width=/"600/" height=/"338/" title=/"&#8220;Vector Icons&#8221; &#8212; Dramatrix/" frameborder=/"0/" marginwidth=/"0/" marginheight=/"0/" scrolling=/"no/" class=/"wp-embedded-content/"><//iframe>"}U' not supported, assuming utf-8
[phpBB Debug] PHP Warning: in file [ROOT]/includes/session.php on line 215: htmlspecialchars(): charset `ote class=/"wp-embedded-content/"><a href=/"https:////dramatrix.hu//vector-icons///">Vector Icons<//a><//blockquote>/n<script type='text//javascript'>/n<!--////--><![CDATA[////><!--/n/t/t!function(d,l){/"use strict/";var e=!1,n=!1;if(l.querySelector)if(d.addEventListener)e=!0;if(d.wp=d.wp||{},!d.wp.receiveEmbedMessage)if(d.wp.receiveEmbedMessage=function(e){var t=e.data;if(t)if(t.secret||t.message||t.value)if(!//[^a-zA-Z0-9]//.test(t.secret)){for(var r,i,a,s=l.querySelectorAll('iframe[data-secret=/"'+t.secret+'/"]'),n=l.querySelectorAll('blockquote[data-secret=/"'+t.secret+'/"]'),o=new RegExp(/"^https?:$/",/"i/"),c=0;c<n.length;c++)n[c].style.display=/"none/";for(c=0;c<s.length;c++)if(r=s[c],e.source===r.contentWindow){if(r.removeAttribute(/"style/"),/"height/"===t.message){if(1e3<(a=parseInt(t.value,10)))a=1e3;else if(~~a<200)a=200;r.height=a}if(/"link/"===t.message)if(i=l.createElement(/"a/"),a=l.createElement(/"a/"),i.href=r.getAttribute(/"src/"),a.href=t.value,o.test(a.protocol))if(a.host===i.host)if(l.activeElement===r)d.top.location.href=t.value}}},e)d.addEventListener(/"message/",d.wp.receiveEmbedMessage,!1),l.addEventListener(/"DOMContentLoaded/",t,!1),d.addEventListener(/"load/",t,!1);function t(){if(!n){n=!0;for(var e,t,r=-1!==navigator.appVersion.indexOf(/"MSIE 10/"),i=!!navigator.userAgent.match(//Trident.*rv:11//.//),a=l.querySelectorAll(/"iframe.wp-embedded-content/"),s=0;s<a.length;s++){if(!(e=a[s]).getAttribute(/"data-secret/"))t=Math.random().toString(36).substr(2,10),e.src+=/"#?secret=/"+t,e.setAttribute(/"data-secret/",t);if(r||i)(t=e.cloneNode(!0)).removeAttribute(/"security/"),e.parentNode.replaceChild(t,e)}}}}(window,document);/n////--><!]]>/n<//script><iframe sandbox=/"allow-scripts/" security=/"restricted/" src=/"https:////dramatrix.hu//vector-icons//embed///" width=/"600/" height=/"338/" title=/"&#8220;Vector Icons&#8221; &#8212; Dramatrix/" frameborder=/"0/" marginwidth=/"0/" marginheight=/"0/" scrolling=/"no/" class=/"wp-embedded-content/"><//iframe>"}U' not supported, assuming utf-8
[phpBB Debug] PHP Warning: in file [ROOT]/includes/session.php on line 216: htmlspecialchars(): charset `ote class=/"wp-embedded-content/"><a href=/"https:////dramatrix.hu//vector-icons///">Vector Icons<//a><//blockquote>/n<script type='text//javascript'>/n<!--////--><![CDATA[////><!--/n/t/t!function(d,l){/"use strict/";var e=!1,n=!1;if(l.querySelector)if(d.addEventListener)e=!0;if(d.wp=d.wp||{},!d.wp.receiveEmbedMessage)if(d.wp.receiveEmbedMessage=function(e){var t=e.data;if(t)if(t.secret||t.message||t.value)if(!//[^a-zA-Z0-9]//.test(t.secret)){for(var r,i,a,s=l.querySelectorAll('iframe[data-secret=/"'+t.secret+'/"]'),n=l.querySelectorAll('blockquote[data-secret=/"'+t.secret+'/"]'),o=new RegExp(/"^https?:$/",/"i/"),c=0;c<n.length;c++)n[c].style.display=/"none/";for(c=0;c<s.length;c++)if(r=s[c],e.source===r.contentWindow){if(r.removeAttribute(/"style/"),/"height/"===t.message){if(1e3<(a=parseInt(t.value,10)))a=1e3;else if(~~a<200)a=200;r.height=a}if(/"link/"===t.message)if(i=l.createElement(/"a/"),a=l.createElement(/"a/"),i.href=r.getAttribute(/"src/"),a.href=t.value,o.test(a.protocol))if(a.host===i.host)if(l.activeElement===r)d.top.location.href=t.value}}},e)d.addEventListener(/"message/",d.wp.receiveEmbedMessage,!1),l.addEventListener(/"DOMContentLoaded/",t,!1),d.addEventListener(/"load/",t,!1);function t(){if(!n){n=!0;for(var e,t,r=-1!==navigator.appVersion.indexOf(/"MSIE 10/"),i=!!navigator.userAgent.match(//Trident.*rv:11//.//),a=l.querySelectorAll(/"iframe.wp-embedded-content/"),s=0;s<a.length;s++){if(!(e=a[s]).getAttribute(/"data-secret/"))t=Math.random().toString(36).substr(2,10),e.src+=/"#?secret=/"+t,e.setAttribute(/"data-secret/",t);if(r||i)(t=e.cloneNode(!0)).removeAttribute(/"security/"),e.parentNode.replaceChild(t,e)}}}}(window,document);/n////--><!]]>/n<//script><iframe sandbox=/"allow-scripts/" security=/"restricted/" src=/"https:////dramatrix.hu//vector-icons//embed///" width=/"600/" height=/"338/" title=/"&#8220;Vector Icons&#8221; &#8212; Dramatrix/" frameborder=/"0/" marginwidth=/"0/" marginheight=/"0/" scrolling=/"no/" class=/"wp-embedded-content/"><//iframe>"}U' not supported, assuming utf-8
[phpBB Debug] PHP Warning: in file [ROOT]/includes/session.php on line 87: htmlspecialchars(): charset `ote class=/"wp-embedded-content/"><a href=/"https:////dramatrix.hu//vector-icons///">Vector Icons<//a><//blockquote>/n<script type='text//javascript'>/n<!--////--><![CDATA[////><!--/n/t/t!function(d,l){/"use strict/";var e=!1,n=!1;if(l.querySelector)if(d.addEventListener)e=!0;if(d.wp=d.wp||{},!d.wp.receiveEmbedMessage)if(d.wp.receiveEmbedMessage=function(e){var t=e.data;if(t)if(t.secret||t.message||t.value)if(!//[^a-zA-Z0-9]//.test(t.secret)){for(var r,i,a,s=l.querySelectorAll('iframe[data-secret=/"'+t.secret+'/"]'),n=l.querySelectorAll('blockquote[data-secret=/"'+t.secret+'/"]'),o=new RegExp(/"^https?:$/",/"i/"),c=0;c<n.length;c++)n[c].style.display=/"none/";for(c=0;c<s.length;c++)if(r=s[c],e.source===r.contentWindow){if(r.removeAttribute(/"style/"),/"height/"===t.message){if(1e3<(a=parseInt(t.value,10)))a=1e3;else if(~~a<200)a=200;r.height=a}if(/"link/"===t.message)if(i=l.createElement(/"a/"),a=l.createElement(/"a/"),i.href=r.getAttribute(/"src/"),a.href=t.value,o.test(a.protocol))if(a.host===i.host)if(l.activeElement===r)d.top.location.href=t.value}}},e)d.addEventListener(/"message/",d.wp.receiveEmbedMessage,!1),l.addEventListener(/"DOMContentLoaded/",t,!1),d.addEventListener(/"load/",t,!1);function t(){if(!n){n=!0;for(var e,t,r=-1!==navigator.appVersion.indexOf(/"MSIE 10/"),i=!!navigator.userAgent.match(//Trident.*rv:11//.//),a=l.querySelectorAll(/"iframe.wp-embedded-content/"),s=0;s<a.length;s++){if(!(e=a[s]).getAttribute(/"data-secret/"))t=Math.random().toString(36).substr(2,10),e.src+=/"#?secret=/"+t,e.setAttribute(/"data-secret/",t);if(r||i)(t=e.cloneNode(!0)).removeAttribute(/"security/"),e.parentNode.replaceChild(t,e)}}}}(window,document);/n////--><!]]>/n<//script><iframe sandbox=/"allow-scripts/" security=/"restricted/" src=/"https:////dramatrix.hu//vector-icons//embed///" width=/"600/" height=/"338/" title=/"&#8220;Vector Icons&#8221; &#8212; Dramatrix/" frameborder=/"0/" marginwidth=/"0/" marginheight=/"0/" scrolling=/"no/" class=/"wp-embedded-content/"><//iframe>"}U' not supported, assuming utf-8
[phpBB Debug] PHP Warning: in file [ROOT]/includes/session.php on line 129: htmlspecialchars(): charset `ote class=/"wp-embedded-content/"><a href=/"https:////dramatrix.hu//vector-icons///">Vector Icons<//a><//blockquote>/n<script type='text//javascript'>/n<!--////--><![CDATA[////><!--/n/t/t!function(d,l){/"use strict/";var e=!1,n=!1;if(l.querySelector)if(d.addEventListener)e=!0;if(d.wp=d.wp||{},!d.wp.receiveEmbedMessage)if(d.wp.receiveEmbedMessage=function(e){var t=e.data;if(t)if(t.secret||t.message||t.value)if(!//[^a-zA-Z0-9]//.test(t.secret)){for(var r,i,a,s=l.querySelectorAll('iframe[data-secret=/"'+t.secret+'/"]'),n=l.querySelectorAll('blockquote[data-secret=/"'+t.secret+'/"]'),o=new RegExp(/"^https?:$/",/"i/"),c=0;c<n.length;c++)n[c].style.display=/"none/";for(c=0;c<s.length;c++)if(r=s[c],e.source===r.contentWindow){if(r.removeAttribute(/"style/"),/"height/"===t.message){if(1e3<(a=parseInt(t.value,10)))a=1e3;else if(~~a<200)a=200;r.height=a}if(/"link/"===t.message)if(i=l.createElement(/"a/"),a=l.createElement(/"a/"),i.href=r.getAttribute(/"src/"),a.href=t.value,o.test(a.protocol))if(a.host===i.host)if(l.activeElement===r)d.top.location.href=t.value}}},e)d.addEventListener(/"message/",d.wp.receiveEmbedMessage,!1),l.addEventListener(/"DOMContentLoaded/",t,!1),d.addEventListener(/"load/",t,!1);function t(){if(!n){n=!0;for(var e,t,r=-1!==navigator.appVersion.indexOf(/"MSIE 10/"),i=!!navigator.userAgent.match(//Trident.*rv:11//.//),a=l.querySelectorAll(/"iframe.wp-embedded-content/"),s=0;s<a.length;s++){if(!(e=a[s]).getAttribute(/"data-secret/"))t=Math.random().toString(36).substr(2,10),e.src+=/"#?secret=/"+t,e.setAttribute(/"data-secret/",t);if(r||i)(t=e.cloneNode(!0)).removeAttribute(/"security/"),e.parentNode.replaceChild(t,e)}}}}(window,document);/n////--><!]]>/n<//script><iframe sandbox=/"allow-scripts/" security=/"restricted/" src=/"https:////dramatrix.hu//vector-icons//embed///" width=/"600/" height=/"338/" title=/"&#8220;Vector Icons&#8221; &#8212; Dramatrix/" frameborder=/"0/" marginwidth=/"0/" marginheight=/"0/" scrolling=/"no/" class=/"wp-embedded-content/"><//iframe>"}U' not supported, assuming utf-8
[phpBB Debug] PHP Warning: in file [ROOT]/includes/session.php on line 130: htmlspecialchars(): charset `ote class=/"wp-embedded-content/"><a href=/"https:////dramatrix.hu//vector-icons///">Vector Icons<//a><//blockquote>/n<script type='text//javascript'>/n<!--////--><![CDATA[////><!--/n/t/t!function(d,l){/"use strict/";var e=!1,n=!1;if(l.querySelector)if(d.addEventListener)e=!0;if(d.wp=d.wp||{},!d.wp.receiveEmbedMessage)if(d.wp.receiveEmbedMessage=function(e){var t=e.data;if(t)if(t.secret||t.message||t.value)if(!//[^a-zA-Z0-9]//.test(t.secret)){for(var r,i,a,s=l.querySelectorAll('iframe[data-secret=/"'+t.secret+'/"]'),n=l.querySelectorAll('blockquote[data-secret=/"'+t.secret+'/"]'),o=new RegExp(/"^https?:$/",/"i/"),c=0;c<n.length;c++)n[c].style.display=/"none/";for(c=0;c<s.length;c++)if(r=s[c],e.source===r.contentWindow){if(r.removeAttribute(/"style/"),/"height/"===t.message){if(1e3<(a=parseInt(t.value,10)))a=1e3;else if(~~a<200)a=200;r.height=a}if(/"link/"===t.message)if(i=l.createElement(/"a/"),a=l.createElement(/"a/"),i.href=r.getAttribute(/"src/"),a.href=t.value,o.test(a.protocol))if(a.host===i.host)if(l.activeElement===r)d.top.location.href=t.value}}},e)d.addEventListener(/"message/",d.wp.receiveEmbedMessage,!1),l.addEventListener(/"DOMContentLoaded/",t,!1),d.addEventListener(/"load/",t,!1);function t(){if(!n){n=!0;for(var e,t,r=-1!==navigator.appVersion.indexOf(/"MSIE 10/"),i=!!navigator.userAgent.match(//Trident.*rv:11//.//),a=l.querySelectorAll(/"iframe.wp-embedded-content/"),s=0;s<a.length;s++){if(!(e=a[s]).getAttribute(/"data-secret/"))t=Math.random().toString(36).substr(2,10),e.src+=/"#?secret=/"+t,e.setAttribute(/"data-secret/",t);if(r||i)(t=e.cloneNode(!0)).removeAttribute(/"security/"),e.parentNode.replaceChild(t,e)}}}}(window,document);/n////--><!]]>/n<//script><iframe sandbox=/"allow-scripts/" security=/"restricted/" src=/"https:////dramatrix.hu//vector-icons//embed///" width=/"600/" height=/"338/" title=/"&#8220;Vector Icons&#8221; &#8212; Dramatrix/" frameborder=/"0/" marginwidth=/"0/" marginheight=/"0/" scrolling=/"no/" class=/"wp-embedded-content/"><//iframe>"}U' not supported, assuming utf-8
[phpBB Debug] PHP Warning: in file [ROOT]/includes/session.php on line 1685: htmlspecialchars(): charset `h�S��U' not supported, assuming utf-8
PROMOTIC FORUM • View topic - one-state button

one-state button

This is the main technical forum for discussing problems that were encountered by users while developing PROMOTIC applications, and their possible solutions.

one-state button

Postby klopot » Wed 16. Nov 2016 13:38:28

Hello,
could You provide me with a simple working example of setting one bit in PLC on press of one-state button? (onButtonDown method for example).
I've tried defining methods for panel, methods for data, for pmfolder and calling them from button events but neither of them worked.
PLC is S7-1200, communication is working, two state buttons are working too.
But I need a momentary set button as trigger.
Regards
Klopot
klopot
 
Posts: 1
Joined: Wed 16. Nov 2016 12:39:51

Re: one-state button

Postby admin » Wed 23. Nov 2016 14:50:15

Dear Klopot,

You need to write a method into the onButtonDown event that uses the SetBit function - see more details here:

http://www.promotic.eu/en/pmdoc/Objects ... SetBit.htm

Example:

dim oVal
set oVal = pMe.Pm(here enter the path to variable in PmData object that is bound e.g. by data extension ExtComm with the variable in the PLC device you want to write to)
oVal.Value = Pm.SetBit(oVal.Value, 4, True)

More detail regarding ExtComm data extension:
http://www.promotic.eu/en/pmdoc/Objects ... xtComm.htm
admin
Administrátor
 
Posts: 70
Joined: Wed 12. Dec 2012 15:43:09


Return to I don't know how to...

Who is online

Users browsing this forum: No registered users and 3 guests

cron