Loading…
Loading…
Method Name: send_password
Method ID: 0x400E
Method Label: Write Password
Method Help: Write Protect Mode- Indicates whether variables can be written to the Field Device, or whether commands that cause actions, to be performed in the Field Device, can or cannot occur. Depending on the Field Device, this is a mode that is controllable by the user, either via the Field Device hardware or the HART Protocol.
- {
- int wp;
- int b0;
- int b1;
- int b2;
- int b3;
- int pass;
- int old_pass;
- send_command_trans(139,0);
- wp = _ivar_value(16395);
- send_command_trans(139,2);
- old_pass = _ivar_value(16396);
- pass = _ivar_value(16397);
- b0 = pass / 1000;
- b1 = pass / 100 - b0 * 10;
- b2 = pass / 10 - b1 * 10 - b0 * 100;
- b3 = pass - b2 * 10 - b1 * 100 - b0 * 1000;
- if (wp == 0)
- {
- wp = 1;
- _iassign(16396,pass);
Please login for more