Hello,
I have a question and i hope you can help me. I want to use Python (see Code below) to get the deviceadress of my CPU an than use this address to login into the CPU via the Test Manager.
If i use the code i get the right information out of the CPU but if i try to use " deviceaddress " out of Pythonscript in my Testscript, the Testmanager says the Format is invalid.
Is this error because the Address is of type "string", or do i have to use a other way to get the address out of the script?
Best regards
Sebastian
\#Finddeviceobjectfound=projects.primary.find('PLC_AC500_V3',True)#('PLC_7',True)assert(foundandlen(found)==1,'No or more than one device found')dev=found[0]\#print(dev)\#==============Β Findgatewaygw=online.gateways['Gateway-1']deviceidΒ Β Β =dev.get_device_identification()\#print(deviceid)devicegateway=dev.get_gateway()\#print(devicegateway)deviceaddress=dev.get_address()print(deviceaddress)Β #=>Output03C8.9000.2DDC.C0A8.090Bprint'type',type(deviceaddress)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sebastian_abb hat geschrieben:
Hello,
I have a question and i hope you can help me. I want to use Python (see Code below) to get the deviceadress of my CPU an than use this address to login into the CPU via the Test Manager.
If i use the code i get the right information out of the CPU but if i try to use " deviceaddress " out of Pythonscript in my Testscript, the Testmanager says the Format is invalid.
Is this error because the Address is of type "string", or do i have to use a other way to get the address out of the script?
For what reason do you want to get the device address through the Scripting and use it to login through the Test Manager?
If the communication path for the device is already configured then you can just login with your test script. If you want to use the Scripting API for the gateways to scan the network and find a suitable device then you can just configure the communication path through Scripting and also just login in the test script.
BR
Martin
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
thanks for the quick answer. I need the address because I use Unit TestΒ΄s with the Testmanager and for this Type of test the Testmanager needs the Deviceaddress. The second reason is that i work with the Automation Builder from ABB and with different versions of the Automationbuilder the deviceaddress changes and so i have to read it out with every Version i use my test on.
Best regards
Sebastian
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I have a question and i hope you can help me. I want to use Python (see Code below) to get the deviceadress of my CPU an than use this address to login into the CPU via the Test Manager.
If i use the code i get the right information out of the CPU but if i try to use " deviceaddress " out of Pythonscript in my Testscript, the Testmanager says the Format is invalid.
Is this error because the Address is of type "string", or do i have to use a other way to get the address out of the script?
Best regards
Sebastian
Hi Sebastian.
For what reason do you want to get the device address through the Scripting and use it to login through the Test Manager?
If the communication path for the device is already configured then you can just login with your test script. If you want to use the Scripting API for the gateways to scan the network and find a suitable device then you can just configure the communication path through Scripting and also just login in the test script.
BR
Martin
Hi Martin,
thanks for the quick answer. I need the address because I use Unit TestΒ΄s with the Testmanager and for this Type of test the Testmanager needs the Deviceaddress. The second reason is that i work with the Automation Builder from ABB and with different versions of the Automationbuilder the deviceaddress changes and so i have to read it out with every Version i use my test on.
Best regards
Sebastian