FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
10-16-2024 05:12 PM
I am investigating a feature involving a ctrlx core updating the parameters of a drive, given the drive has been replaced. I know this is to be done by the Drive connect app, but I'm struggling to find how exactly. I've searched through the forums and wasn't successful in finding someone using the drive connect app like this.
My first thought was to pull the data of the serial numbers of the connected drives, and if that didn't match the last time the core had been booted up to write the parameters stored within the drive connect apps data locations to the drives by their ethercat position. I was able to load firmware and drive parameters to the drive connect app, but have been unable to querry what drives are actually connected.
Is there an example or guide somewhere on how to do this? The drive connect apps manual explains how to do it all manually but not how to do it automatically, as it happening without much human intervention is best.
10-17-2024 08:58 AM
First of all, which versions of the ctrlX OS system apps and the DriveConnect app is used?
If you use the description for manual access you can do the same things e.g. automated via REST or also via a data layer client sending the same comands to the same nodes.
10-17-2024 03:43 PM
I am using 2.6 for the core and 2.4.2(legacy) for the DriveConnect app. Here is a screenshot of an attempt to pull the information as described by the DriveConnect manual.
I am able to pull information correctly from the data layer, after I already know the serial number of the drive, but I can't figure out how to pull the serial number in order to complete the filepath for the REST API to do it's job. I attempted to follow it with Node Red, and my subscription always says invalid address.
After some tinkering, just clicking the magnifying glass next to the path and setting it to /devices/drives seemed to make it work. Not sure why putting that in manually doesn't work, but the magnifying glass does. I'm going to keep working on this and potentially post my finished demo for someone else to follow. If I struggled someone else will too.
a month ago
Which version of PLC Engineering is used, as the screenshot seems to be from the automatic subscription import and not all data types are working with all versions.
Some information to that:
The IP address as well as username and password are normally part of the configuration of the subscription and not part of the inserted path. Please compare the path inserted via magnifying glass and manual.
a month ago
My PLC Engineering is 2.6.2. I found the comfort data exchange guide, and it only shows pulling the information requires a library that seems to need at least 3 dot. So I'll need to stick to Node-Red to do this.
I've been working on this a fair bit, and I keep running into the same issue. Following your guide on using YARC, I was able to confirm from another source that the data I've been putting into the payload is being bounced as incorrectly formated. I know that this works, because it works when done manually. For some reason, Node-Red and YARC are returning the same issue.
There will be more struggles after this, but at least getting the drive parameters automatically loading, and updating the filepaths will be needed. It seems that the order the serial addresses are returned on a browse request is in reverse topographical order. That gives the topology information needed to rebuild them, but I don't know how to automatically change filepaths in Node-Red.
a month ago
Changing that YARC command from "PUT" to "POST" causes it to work. That's great. I can't figure out how to do this successfully with Node-Red. In Node-Red, a setup I created from someone elses returns a certificate error, Depth_Zero_Self_Signed_Cert. The attached flow is what I attempted to utilize, and the source of what I was copying.
a month ago
Is there a reason why our pallette "node-red-contrib-ctrlx-automation" should not be used, as it includes direct data layer access nodes and will do the token handling automatically? IT could look something like this:
[{"id":"03ef7e4fa6dce8d4","type":"ctrlx-datalayer-request","z":"b9ce7ad7b1786523","device":"8930c0787f4ed5fd","method":"CREATE","path":"https://192.168.1.1/automation/api/v1/devices/drives/XCS-7260771004210/subdevices/subdevice-0/import-parameter","payloadFormat":"value_type","name":"","pendingWarnLevel":50,"pendingErrorLevel":100,"x":700,"y":260,"wires":[[]]},{"id":"c4fdca3403797f6a","type":"inject","z":"b9ce7ad7b1786523","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":"20","topic":"","payload":"{ \"password\": \"boschrexroth\", \"name\": \"boschrexroth\" }","payloadType":"json","x":150,"y":260,"wires":[["48f84fbf30410090"]]},{"id":"48f84fbf30410090","type":"function","z":"b9ce7ad7b1786523","name":"Message Loader","func":"msg.payload = \n{\n \"fileName\" : \"filesystem/parameterfiles/Drive1Parameters.par\",\n \"setIndex\": 0\n};\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":350,"y":260,"wires":[["03ef7e4fa6dce8d4"]]},{"id":"8930c0787f4ed5fd","type":"ctrlx-config","name":"","hostname":"localhost","debug":false}]
The found devices are typically sorted alphanumeric and not related to the topology.
Please also have a look to our examples https://github.com/boschrexroth/node-red-contrib-ctrlx-automation/blob/master/doc/EXAMPLES.md