Custom Web Site, Crimson 3.

Elcan

Lifetime Supporting Member
Join Date
Apr 2008
Location
NC
Posts
935
Hi all,
I'm in the process of creating my first custom web site in Crimson 3.
There are a few code examples on how to show and modify tag values, but there's nothing on how to add a momentary push button (to start/stop a motor, for example).
I don't want to reinvent the wheel here, so if somebody is willing to share their sample code for a momentary push button, I will really appreciate it.

Thank you!
 
OK, I did my best and I still cannot get nowhere near my Start/Stop buttons...
I know how to program in general, and in HTML in particular, but I don't have experience with JavaScript. I'm trying to change the value of Flag1 (index 4) using a onClick event.

I'm attaching the cd3 and htm files. I will appreciate if somebody can take a look at it and tell me why it is not working.

My final goal is to emulate a momentary push button. My idea is to assign "1" to the the Flag1, wait 1000 millisec and then assign "0". But I am stuck at assigning a value to the tag using a button...

Thanks!
 
I can't believe nobody has created a custom website for Crimson 3 to start/stop a motor ...
 
Nobody in the forum replies, so probably anybody has tried this.
Red Lion tech support does not help, so probably this is not very easy to accomplish.
Conclusion: the Crimson 3 custom website is not usable if you need something more than just display or enter tag values. Don't think you can do stuff like start/stop motors, or anything that implies using buttons.

:confused:
 
I did a custom website for a Red Lion Recently using Frontpage as my web site editor. I generally used the web page to display data. If I had to do any modifications to tags or programming I performed it in a program residing in the red lion. I don't think that you can change the value of a tag from the web page, it appeared to me to be for display and formating purposes only.
 
I did a custom website for a Red Lion Recently using Frontpage as my web site editor. I generally used the web page to display data. If I had to do any modifications to tags or programming I performed it in a program residing in the red lion. I don't think that you can change the value of a tag from the web page, it appeared to me to be for display and formating purposes only.
Thank you for your comments, Giz99.
Actually, you can change tag values for the custom website. You need to use a code like this:
<!-- This code displays the current tag value for index 1-->

<font face=tahoma size="2">
<b>Tag with Index 1 in Crimson 2.0 Data Tags.</b>
<br><br>
Current Value:  [[1]]
</font>

<!-- The following code is the form to enter the value and submit to the HMI -->

<form name=form1 method=post action=/scripts/write-tags autocomplete=off>
<font face=tahoma size="2">
<input type=hidden name=tag1 value=1>
<input type=hidden name=back value=/user/default.htm>
<input type=hidden name=page value=1>
New Value: 
<input type=text name=data1 value="[[1]]" style="font-face: tahoma; font-size: 12">
<input type=submit name=submit value= OK  style="font-face: tahoma; font-size: 12">
</font>
</form>
<br>


As, I said, my idea of emulating a momentary button is to set the corresponding tag as 1 for a second (or X millisec) and then set it back to 0. My approach was this:
<!-- <input type=submit name=submit value= OK  style="font-face: tahoma; font-size: 12"> -->
<input type="button" value="START" onClick = "SetBit()">


I commented the original submit and I added an onClick event associated to a function "SetBit".
This function is declared here:
<script>
function SetBit()
{
alert("Button Pressed");
document.forms["form1"].submit();
//setTimeout(function(){},5000);
}
</script>

The alert was just a way to check that the onClick event was triggered, and it was, but the submit does not work. I don't have experience writing code in JavaScript, so I don't know how to go on.
 

Similar Topics

Hey Guys, So I have a problem, and there seem to be a couple of ways that I might can fix the issue, so here it goes. This is for people who...
Replies
6
Views
3,781
How much effect do they have on scan time? The memory usage is obvious. How does the processor handle the webpages or is it handled elsewhere...
Replies
0
Views
1,691
Hi I must write a custom webpage, from wich a user can save a csv file that contains the controller tags and their values. I use a 1768-eweb...
Replies
0
Views
2,663
Good day! I am working on a project at our campus to integrate fleet vehicle chargers with load management so we don't overwhelm our service. The...
Replies
37
Views
3,799
I imported a customised shape into the project, but I don't know how to actually add into on to a specific HMI screen. Do I use the Graphics menu...
Replies
2
Views
657
Back
Top Bottom