blewl

How to read/write drive parameters?

13 posts in this topic

Hi

I have setup cyclic messaging of the drive which controls the basics.  Now I need to read and write the parameters.

Which instruction do I use?  The drive manual says:

Quote

Access to drive parameters uses vendor specific CIP objects (Class A2h). All User Adjustable Parameters are accessible.

In siemens PLC with Profinet I used the RDREC and the WRREC instructions.

Any help would be great.

Share this post


Link to post
Share on other sites

What drive are you using?  You'll need to setup a MSG instruction.

You can get the comms manual from the AB literature library for whatever drive you're using.

I believe there is a limit on the number of writes you can do to a drive, I would make sure you're not writing the parameters every scan.

 

Share this post


Link to post
Share on other sites

Sorry man, I have no idea.  You'll have to find the communication manual from Invertek or maybe someone else on this site has some experience with this drive.

 

Good Luck.

Share this post


Link to post
Share on other sites

Do you have any idea how to setup a MSG instruction?  I have a good idea of what to put in all the Mnemonics.  But where the hell do I put the Mnemonics? I understand that they are some sort of tag.

Share this post


Link to post
Share on other sites

I did it, you need to go into controller tags on the left hand side and add a Tag for the parameter you want to modify.

Make the data type 'MESSAGE'

It then comes up with all the Mnemonics.  But I think you don't need to touch any of them, not sure.

Add a MSG instruction and assign the message tag you made in controller tags,

Then click on the button to the side of it.

Then follow this video.

Cheers for your help guys

1 person likes this

Share this post


Link to post
Share on other sites

An A-B drive would  be straightforward because they either emulate a PLC/SLC data table file, or have a well defined Parameter object.

Your Invertek drive with the HMS Fieldbus module will be a little more complex;   as it says, they use a vendor-specific object.    Maybe it's identical to the Rockwell Parameter object, or maybe it's a whole different beast.

Which model of Invertek drive are you using ?   Can you post a link to the EtherNet/IP user manual you're referring to ?

You can practice with the MSG instruction by sending a CIP Generic message to perform a "Get Attribute Single" with Class/Instance/Attribute = 1/1/1.   That will read the Vendor code from the drive's network module.    That at least should get you familiar with setting the path and triggering MSG instructions in Studio 5000.

 

 

 

Share this post


Link to post
Share on other sites

There isn't a ethernet/IP manual for the drive.  It is literally the line I quoted. That is all.  It's a P2.

I used 'CIP generic' and 'Get Attribute single'. But my Class was A2, instance was the parameter number I wanted to read and Attribute was 5.

Share this post


Link to post
Share on other sites

How did you figure out the messaging data objects for Profinet ?   Or is it just EtherNet/IP they didn't provide documentation for ?

I found a brief "user manual" for the "ETHNET-CC" EtherNet/IP module but it doesn't provide details about parameter access.   It does claim that they have a CIP Parameter Object (which often applies only to the objects contained in the adapter device itself, not the drive), but I didn't find the reference to the Vendor Specific Object you mentioned.

http://www.invertekdrives.com/variable-speed-drives/optidrive-p2/documentation.aspx

What exact drive manual are you looking at ?

Share this post


Link to post
Share on other sites

It's the same amount of info for Profinet, just one line.  I found the advanced user guide, which I have attached. See page 37.

For profinet I did lots of googling, I did nearly everything that the examples showed. But it still didn't work.  What you need to do is write the input data to a memory address (with the MOV instruction) then put the memory address to the inputs of the RDREC/WRREC block.

P2 Advanced User Guide Rev 1.20.pdf

Share this post


Link to post
Share on other sites

Thanks for posting that PDF !   I think we're going to be able to decode this from known values, Enigma-style.

Another key phrase appears at the bottom of the DeviceNet and EtherNet/IP sections:

Quote

The table gives the Instance Attribute, Name and Value (X) for each parameter.

When we look at the parameter table, there's a column that gives those values.   I think the manual is using some confusing nomenclaure, so we'll be careful with it.

As an example, Parameter P1-07 is the Motor Rated Voltage.   The default value is 230, for 230 volts.   It's an unsigned 16-bit Integer value.

The network object values for that parameter are listed as "A2h, 107, X".

We can agree that A2 (hexadecimal) is the CIP Class value.   That's consistent both with the manual description and with general CIP protocol practice;  Class A2(hex) is commonly used as the Vendor Defined Object.

An ordinary CIP protocol object description would list the Class, the Instance, and the Attribute numbers.     The manual claims to be listing the "Instance Attribute, Name, and Value (X)", which is confusing.   

So let's try what makes sense from a CIP perspective.     Create a MSG instruction that you've proven works (like with the C/I/A = 1/1/1 example I gave), then set it up for Class A2 (hex), instance 107 (decimal) and Attribute 1.    Observe carefully when you type in those values;  the MSG instruction generally accepts hex for the Class, decimal for the Instance, and hex for the Attribute.  

I'm reasonably confident that the Parameter number = the Instance number, but I'm less confident about the Attribute.    Some objects just put the data value in Attribute 1, while others put other data first, like the data type or the data size or the read/write setting.

Because we know what value we expect for that Parameter (230 = 230V) then we can poke around an determine which Attribute is appropriate.

 

Share this post


Link to post
Share on other sites

It's a shame that this can't be done be done via a Generic-EtherNet Module with instances and file lengths.  Seems like the data is scattered all over the place.

1 person likes this

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now