Hello,
I want to reset a datapoint to "0". Therefore I use the function "dpSetWait()". That works easily when the device is created.
But now I want to reset the datapoint over the IP-Adresses of the devices. This is because of creating a template. I want to use the "dpSetWait"-function in several projects, but don't want to change the names in that function every time.. The IP-Adresses will never change.
Today my function looks like this:
dpSetWait ("Systemname:Devicename.datapointname", 0);
I suggest something in this way:
dpSetWait ("Systemname:IP-adress.datapointname", 0);
Has anyone an idea? Is my idea realizable?
With best regards,
Alex
Using \"dpSetWait\"-Function with IP-Adresses
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: Using \"dpSetWait\"-Function with IP-Adresses
Hello Mr. Berndt,
with the function dpSet()/dpSetWait() you can only set values for the configs+attributes for elements of existing datapoints.
There is no possibility to use IP-adresses at the CTRL-functions to modify dp-elements.
You have to specify the device-name in this case.
With the function dpNames() you can read the information which datapoints exist. At the function dpNames() you can use patterns to filter the result.
Maybe this function can be used to detect which devices exist.
Best Regards
Leopold Knipp
Senior Support Specialist
with the function dpSet()/dpSetWait() you can only set values for the configs+attributes for elements of existing datapoints.
There is no possibility to use IP-adresses at the CTRL-functions to modify dp-elements.
You have to specify the device-name in this case.
With the function dpNames() you can read the information which datapoints exist. At the function dpNames() you can use patterns to filter the result.
Maybe this function can be used to detect which devices exist.
Best Regards
Leopold Knipp
Senior Support Specialist
- leoknipp
- Posts:2928
- Joined: Tue Aug 24, 2010 7:28 pm
Re: Using \"dpSetWait\"-Function with IP-Adresses
Hello Mr. Berndt,
with the function dpSet()/dpSetWait() you can only set values for the configs+attributes for elements of existing datapoints.
There is no possibility to use IP-adresses at the CTRL-functions to modify dp-elements.
You have to specify the device-name in this case.
With the function dpNames() you can read the information which datapoints exist. At the function dpNames() you can use patterns to filter the result.
Maybe this function can be used to detect which devices exist.
Best Regards
Leopold Knipp
Senior Support Specialist
with the function dpSet()/dpSetWait() you can only set values for the configs+attributes for elements of existing datapoints.
There is no possibility to use IP-adresses at the CTRL-functions to modify dp-elements.
You have to specify the device-name in this case.
With the function dpNames() you can read the information which datapoints exist. At the function dpNames() you can use patterns to filter the result.
Maybe this function can be used to detect which devices exist.
Best Regards
Leopold Knipp
Senior Support Specialist
- Gertjan van Schijndel
- Posts:634
- Joined: Mon Aug 02, 2010 10:37 am
Re: Using \"dpSetWait\"-Function with IP-Adresses
You can not use the IP-address as datapoint name, because it contains dots '.'. If you replace the dots in the IP-address with underscores '_', then it is possible.
Your function call would be something like this:
Your function call would be something like this:
Code: Select all
dpSetWait("Systemname:192_168_1_100.elementname", 0);- A.Berndt
- Posts:2
- Joined: Fri Sep 09, 2011 1:18 pm
Re: Using \"dpSetWait\"-Function with IP-Adresses
Thank you for yours quick answers.
@ Leopold Knipp: I will try it and then post my experiences!
@ Gertjan van Schijndel: I tried your idea, but it doesn't work. I think it'll work when I would name the devices like their IP-Adresses. I will think about this opinion..
@ Leopold Knipp: I will try it and then post my experiences!
@ Gertjan van Schijndel: I tried your idea, but it doesn't work. I think it'll work when I would name the devices like their IP-Adresses. I will think about this opinion..
- fmulder
- Posts:330
- Joined: Wed Feb 03, 2010 9:46 am
Re: Using \"dpSetWait\"-Function with IP-Adresses
You might consider using the alias of a dp element ( assuming you're not using it for something else ).
Look in the help file:
- Control\\Introduction to control\\Adressing types
Good luck
"Share the fun"
Frenk Mulder
Look in the help file:
- Control\\Introduction to control\\Adressing types
Good luck
"Share the fun"
Frenk Mulder