PLCHome / node-red-contrib-ads

Beckhoff TwinCat ADS support for Node-Red.
MIT License
15 stars 11 forks source link

Fetching name of program? #15

Closed EsbenLorenzen closed 5 years ago

EsbenLorenzen commented 5 years ago

I am setting up a dashboard to browse available ADS symbols, which is working fine.

When fetching the variable names as objects via the ADS Symbols node, they are return as ".TEST_VARIABLE_1" for example. This is despite the variable being declared inside the MAIN program on the PLC.

Is there a way to get the relevant program name, together with the variable name? If this is not possible at this time, would it be possible to implement, or is this a restriction in the ADS protocol?

PLCHome commented 5 years ago

".TEST_VARIABLE_1" must be globally defined. Programs have no "." at the beginning of the name. image

Function blocks are types: image Varname: CALENDER.FBCONVERTTIME.IN

Types are types: image Varname: CALENDER.CALENDAR.UTC

You can also search deeper in the type by looking for the type below the variable. All names must be concatenate with ".". Varname: CALENDER.FBCONVERTTIME.TZINFO.BAIS image

PLCHome commented 5 years ago

image

I use "?. " to find programs

vdwpsmt commented 4 years ago

If I understood the documentation, it should be possible to search multiple symbols in the ads symbols, in 1 request. As input I should use a "string array". How should this be formatted exactly? I don't find the right syntax...