Send a password every Five min
-
Hello, please Your support, there is a controller that need to receive a pasword every time that i need to get information, I send once it manually. but if i lost the communication for more tan 5 minutes the controller need again this password
.
I créate a point but didnt work. how i can send this password every 5 min???
Please Your support -
Hi Jorge,
That would be done by adding the point that you have configured for the password registers to the context of a scripting data source, and then having the scripting data source set the value to the point on a cron pattern like
0 0/5 * * * ?
passwordPoint.set(0xdeadbeef); //send this hexidecimal value as a set to the register
-
Sorry Didnt work, please let me to explain You.
The controller have 12 Batteries.
Each batteries need the password
Each password must be "0000".
Can créate just one scripting datasource for all batteries?
Where I can check that the password is (0000), without brackets?
I need to change something in every original point (Write Type: Not settable)
Please could You check, because i have some thing wrong
In advance thanks so much
Jorge G
-
Hi Jorge
you can use one script change 0xdeadbeef to 0x0000
also, change your cron to 0 0/5 * * * ? so that the script will run every 5minutes.
every time your passwordPoint gets set to a 0x0000 value it will get put into the Modbus write queue. -
Thanks Craig,
was Change the cron to 0 0/5 * * * ?
When I press validate icon appear: (ReferenceError: "passwordPointp385" is not defined in at line number 1)
I need to put every one data point in the script?,
If your answer is Yes, it means that I need to repeat thsi script for every one datapoint.?
Is correct how i wrote the scripts?
passwordPointp385.set(0xdeadbeef); //send this hexidecimal value as a set to the register
passwordPointp386.set(0xdeadbeef); //send this hexidecimal value as a set to the register
if the customer change the current password, how we will get the new hex value?
I will appreciate so much your supportthanks, Jorge G
-
In the last image you posted, the points' variable names are p385 and p386 but in the script body they're being referred to as passwordPointp385 and passwordPointp386, so that is why you got the reference error. As Craig said you'll want to use the actual hexidecimal password (or if it's just a number remove the 0x before the number for decimal) instead of 0xdeadbeef, which is just one of the many things which can be spelled in hexidecimal.
if the customer change the current password, how we will get the new hex value?
I will appreciate so much your supportYou will be told the value they changed it to, I would expect, then you could change it. If you want to, you could store the password in a point and then send the value of the point. Then when the password changes you just set a new value to the point.