Proble in implementing simple ''C Block 2'' in Xcos.

sanjeev pandey sanjeev211988 at gmail.com
Wed Aug 4 18:05:13 CEST 2010


Hi,

I am currently using  *Scilab-master-1279908969* and also *
Scilab-5.3.0-beta-2*.

I have been trying to understand the working of ''C Block 2'' and hence made
a very simple test model in Xcos (Please look at the attachement
test1.xcos).
*
*The content of the Funtion definition in C was enetered as follows..

*#*include <math.h>
#include <stdlib.h>
#include <scicos_block.h>
void toto(scicos_block *block,int flag)
{
  double u,y;
  u=block->inptr[0][0];
  y=u+u+u;
  block->outptr[0][0]=y;
}

After clicking 'ok' and exiting the dialog box the following message was
shown on the Scilab Console :

!Wrong number of input arguments:   !
!                                                     !
!Arguments are :                              !

And after running the model following error appeared:

!--error 999
mputl: Wrong type for input argument #1: String expected.
at line      60 of function recur_scicos_block_link called by :
at line      27 of function build_block called by :
at line      80 of function c_pass1 called by :
at line      50 of function do_compile called by :
at line      96 of function do_update called by :
at line     142 of function xcos_simulate called by :
icos_debug(0); xcos_simulate(scs_m, 4); ;notify("-1273512298")
while executing a callback                 !

Also the C-block used in one of the demo files *C:\Program
Files\scilab-5.3.0-beta-2\modules\xcos\demos\pendulum_anim5.xcos*  does not
seem to work properly. C-Block does not recognize the Real parameters vector
taken from the context menu and hence the model does not work.

Please guide me on this issue and let me know my mistakes. This would be
helpful for me to use the C Block 2 for more complicated applications.
Thanks in anticipation.
-- 
Sanjeev Pandey

Graduate Student,
Process Systems Engineering
Helsinki University of Technology,Finland
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20100804/d94025f1/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test1.xcos
Type: application/octet-stream
Size: 33504 bytes
Desc: not available
URL: <https://lists.scilab.org/pipermail/users/attachments/20100804/d94025f1/attachment.obj>


More information about the users mailing list