From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
09-10-2017 09:50 AM
Dave,
Currently strugglening with the FHPP myself, would you be willing to share your code ? I understand that Peter can not share his, although the bits he left were imensly usefull.
In advance thanks.
/søren
09-11-2017 02:15 AM - edited 09-11-2017 02:16 AM
Hi Sören,
I recently wrote my own driver for a Festo CMMO-ST device.
As the Modbus messages used by the device are so easy to build/parse I went for simple TCP messages (instead of any Modbus library in between).
Parsing the FHHP message looks like this:
(Basically get the 8 data bytes of the FHPP message and put them in a cluster.)
Creating the FHPP bytes is also quite easy:
I'm using the CMMO-ST to drive a stepper motor. I only need to go to certain positions and use it's semi-automatic auto-referencing at startup.
When following the Festo manual it's really easy to develop your own driver as they provide you with good information about the internal controller states you have to complete/follow!
09-11-2017 04:07 AM
Gerd,
That's brilliant, very much a KISS solution. I did find myself changing back and forth between U8 and U16 for no particular rason here... If you can share your FHPP cluster (input/output) also that would be great.
Thanks a bunch...
/søren
09-11-2017 04:20 AM
09-19-2017 05:22 AM
Hi Soren,
First off apologies for the slow reply - some other duties meant I did not log into the forums for a while.
I think you may already have an excellent solution from Gerd and have already implemented it! However, if not, I attach some screen-shots from my code. I doubt it is as elegant but if you are going for the modbus commands here is what I did.
The obvious - this is the vi I am using for reading and writing - unput and output are U16 arrays.
First of all FESTO provided me with this very nice 'cheat sheet' for FHPP commands which can save some time going through the manual! They also have their own modbus TCP client that they can provide to you - it is a good way of figuring out the commands to you need to get the motor running! All of my inputs in the first 3 bytes are false except for Brake, Stop, Enable, Halt, Start, Reset and Home. They are changed based on if you are starting, homing or stopping the drive.
So I'm just converting these bytes into u16 (probably badly and inefficiently ;-)).
The velocity is a percentage of the maximum you set using the Festo Configuration Tool - so hardwired into my vi is 20mm/s - this is why I divide by 20 and multiple by 100. Position is multipled by 1000 as this is the accuracy I set in the FTC factor group! (10-3) so 10.00mm is written as 10000
This is the code I use to configure the U16 input array!
Above is what my front-panel looks like for the input conditions selected......also I think I'm using FHPP+ rather than FHPP which is the reason for elements 5-8 in the array. These are not needed (as far as I can recall) if you just go with FHPP control.
For parsing the data received back I used the following vi:
And here is what the front panel looks like for a typical read of data
Hope this all helps,
Dave
08-07-2018 06:49 AM - edited 08-07-2018 06:54 AM
Hi,
i recently have to do the same as you and find the screenhot of GerdW very helpful on how to build the modbus words and how the extract the data of the response.
But what VIs do i have to use to create a connection to the drive and which VIs are used to write and read from the drive?
@GerdW: You wrote that you use "simple TCP messages". So just
TCP open connection
TCP Write (data in: string created via GerdWs example)
TCP Read (data out:string converted via GerdWs example
TCP Close connection
Thanks for your help
bet regards
08-07-2018 08:01 AM - edited 08-07-2018 08:04 AM
12-06-2018 03:13 AM
Thank you very much with this Help. Today I can control the basics parameter of my Festo Controller without problems.
I want to take more features under control and in the future, I will need to read and write Holding Register of Festo using Labview. I would like to control all the necessary driving´s PNU from my VI, such as Record Table, Group Factors, software and Hardware Limits, max. (and min.) Velocity, and max. (and min.) Acceleration.
There is someone who knows basically how to begin this Odyssey?
Thank everyone very much.
12-06-2018 07:39 AM
12-11-2018 04:30 AM - edited 12-11-2018 04:31 AM
Hey GerdW,
thank you for your tip, but I have read the manual more than a couple of times and I can´t find the answer in. I have no problems to control my FESTO motor with Modbus, but when I want to change parameters like "Factor Units" or "Maximal Velocity" with Labview, I don´t reach my goal. I can change this PNU parameter just using the FESTO software, but I can not see how to manage this PNU paramers with Labview wires.
Now a leave my current questions, in order to expose better my blurred lines and state of confusion:
Should I send 4 or 8 words? Should I send more bytes?
How operate FHPP+ with Labview and which Labview Modbus Function should I use to read/write PNU parameters?
I hope someone can help me!
Thanks everyone. I wish you all a great week!