God bless industrial programming. I need to display a data table with a less than 2 kb html file. Can I write a loop command in html? Something like:
For i=1 to 255
Ul <ai> <bi> <ci> <br>
Can it be done? Maybe via javascript?
God bless industrial programming. I need to display a data table with a less than 2 kb html file. Can I write a loop command in html? Something like:
For i=1 to 255
Ul <ai> <bi> <ci> <br>
Can it be done? Maybe via javascript?
Awesome. I might be able to make that work.
sonofabitch. I’m so close.
I want a variable to go like this:
<!ABDTR-F132:0>
<!ABDTR-F132:1>
<!ABDTR-F132:2>
etc.
If I set up a for loop
for (i=0;i<=10;i++)
What the fuck is the right syntax to stick that i into my variable?!
<!ABDTR-F132:i> doesn’t work no matter where I try sticking + or " or spaces.
I hate coding!
Just don’t accidentally your variable.
all the example code from the link show ’ + i + ’ with the single quote line thing.
??
No dice. that <!ABDTR-F132:0> is for directly addressing allen bradley plc data tables. It seems like there’s no way to turn the 0 into a variable without fucking up the AB function. Uggh.
http://forums.mrplc.com/
Maybe someone there would know of a way.
can you use php? or just html/javascript?
php ftw
I hate web development, most frustrating thing ever
if you can use php, i can give the code for making the entire <!ABDTR-F132:0> string a variable… and then the last digit will increase along with the counter.
other dynamic languages (like asp) will work also, maybe even another way with JS, but i’m only familiar w/ php.
FML. I figured out how to do it, but it just won’t interface with the PLC. For example, the code below returns
0
1
2
<script type=“text/javascript”>
jim0fry = 0
jim1fry = 1
jim2fry = 2
i=0
for (i=0;i<3;i++)
{
var fryrules = window[‘jim’ + i + ‘fry’]
document.write(fryrules);
document.write("<br />");
}
</script>
But if I do the same thing to try to print the values of <!ABDTR-F132:0>, <!ABDTR-F132:1>, and <!ABDTR-F132:2> I get undefined. So it’s fucked.