cancel
Showing results for 
Search instead for 
Did you mean: 

Drive Parameter Loading with the Drive Connect App

Drive Parameter Loading with the Drive Connect App

NickC
New Poster

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. 

6 REPLIES 6

CodeShepherd
Community Moderator
Community Moderator

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.

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.

NickC_0-1729168975870.png

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.

NickC_1-1729169452790.png

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.

 

CodeShepherd
Community Moderator
Community Moderator

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:

  1. How to set up Data Layer watchlists and integrate them into ctrlX PLC [DOCU] - [VIDEO]
  2. Command “from ctrlX CORE watchlists...”

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.

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. 

NickC_0-1729267404483.png

NickC_3-1729267948665.png

 

NickC_1-1729267630626.png

NickC_2-1729267845596.png

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.

 

 

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.

CodeShepherd
Community Moderator
Community Moderator

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 

Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist