[etherlab-users] Help: Problem of reading model signal via pdcom

Richard Hacker ha at igh-essen.com
Tue Nov 30 13:42:19 CET 2010


On Monday 29 November 2010 19:31:04 Jayson Ding wrote:
> Hi Richard
> Thank you for pointing me out. I did not realize variables /
> single_motor_pos/add is the signal I am looking for.
> I used to use matlab xPC target. I thought Pdcom worked as the same way
> treated parameter and signal from matlab simulink model separately.
> By the way, would you please tell me how to continuously print out
> signal value in a console?
pdquery is used to print values once only and then exit. It does not have the 
funtionality of printing continuously.

If you want to do that, you will have to get the pdcom library 
(http://www.etherlab.org/download/pdcom/pdcom-3.0.4.tar.bz2) and write you own 
(C++) application to use it. Included is a small example that you could 
extend.

BTW pdquery is by itself just another application using pdcom.

- Richard

> I tried to add while loop to get values under example::notify(). But the
> data was not updated.
> It seems like I have to follow up certain routine to do that.
> thank you.
> Jayson
> 
> > Hello,
> >
> > have a look, all the signals you want are there. For example
> >   /single_motor_pos/Add
> > is the output of you "Add" block just before the Saturation block!
> >
> > - Richard
> >
> > On Sunday 28 November 2010 06:26:10 JaysonDing wrote:
> >> Dear All
> >> I have problem of reading the encoder input signal via pdcom.
> >> I was able to run pdcom example code on my machine. The output are as
> >> following:
> >> (Note: I add few codes to print out all the obtained variables.). The
> >> Simulink model is also attached.
> >>
> >> Connecting to 192.168.0.105:2345...
> >> Connected.
> >> <2>  MSR Protocol handler recognises the protocol.
> >> <2>  Waiting for<connected>  tag.
> >> <2>  Autodetected MSR Protocol.
> >> <2>  <connected>  tag arrived.
> >> clientInteraction()
> >> Username=meka
> >> Hostname=meka-mist
> >> Application=pdcom example
> >> <2>  Logging in as "meka at meka-mist"
> >> <2>  Requesting parameter list.
> >> <2>  Message from process at 1290633249.891519: (0) Adminmode filp: 5
> >> <2>  Found 10 parameters.
> >> <2>  Requesting channel list.
> >> <2>  Found 17 channels.
> >> <2>  Protocol initialisation finished.
> >> /single_motor_pos/Data Type Conversion
> >> /single_motor_pos/Derivative
> >> /single_motor_pos/Gain
> >> /single_motor_pos/Gain1
> >> /single_motor_pos/Gain2
> >> /Taskinfo/Abtastfrequenz
> >> /single_motor_pos/Gain/Gain
> >> /single_motor_pos/Gain1/Gain
> >> /single_motor_pos/Gain2/Gain
> >> /single_motor_pos/Gear/Gain
> >> /single_motor_pos/Integrator/InitialCondition
> >> /single_motor_pos/Saturation/UpperLimit
> >> /single_motor_pos/Saturation/LowerLimit
> >> /single_motor_pos/Signal Generator/Amplitude
> >> /single_motor_pos/Signal Generator/Frequency
> >> /single_motor_pos/Gear
> >> /single_motor_pos/Integrator
> >> /single_motor_pos/Saturation
> >> /single_motor_pos/ENC_0
> >> /single_motor_pos/Signal Generator
> >> /single_motor_pos/Add
> >> /single_motor_pos/Sum
> >> /Time
> >> /Taskinfo/0/TaskTime
> >> /Taskinfo/0/ExecTime
> >> /Taskinfo/0/Period
> >> /Taskinfo/0/Overrun
> >> notify(): /single_motor_pos/Integrator 0
> >> notify():/single_motor_pos/Integrator 0
> >> Finished.
> >>
> >> It seems like Pdcom could only recognize parameters such as
> >> constant/value or gain/gain in Simulink model but not signal.
> >> Can anyone tell me how to get access to the signals?  In the end, thanks
> >> for everyone of you effort. So I can make etherlab + pdcom run on my
> >> computer quickly. I also attached my system setting here FYI.
> >> linux: 2.6.32.11
> >> rtai:3.8.1
> >> etherlab: 1.3-pre
> >> matlab: 7.4.0.336
> >> realtime workshop: 6.6
> >>
> >> Look forward to your answer!
> >>
> >> Jayson
> 

-- 
------------------------------------------------------------------------

Richard Hacker                               Amtsgericht Essen HRB 11500  
Ingenieurgemeinschaft IgH                    USt-Id.-Nr.: DE 174 626 722 
Ges. für Ingenieurleistungen mbH             Geschäftsführung:           
Heinz-Baecker-Str. 34                        Dr.-Ing. S. Rotthäuser      
D-45356 Essen                                Dr.-Ing. T. Finke           
Tel.: +49 201 / 36014-16                     Dr.-Ing. W. Hagemeister     
Fax.: +49 201 / 36014-14                     Tel.: +49 201 / 360-14-0    
richard.hacker at igh-essen.com                 http://www.igh-essen.com    

------------------------------------------------------------------------



More information about the Etherlab-users mailing list