Error: Initialization commands cannot be evaluated while working with xpc target supported A/D library blocks!

8 次查看(过去 30 天)
I am trying to use the Humusoft Analog Input s-function block available in the simulink A/D library of xpc target version 5.3 with respect to the following working scenario:
Host PC : Notebook(Installed with MatlabR2012b 32-bit compatible with xpc target version 5.3, Windows 7 OS)
xPC Target PC: Industrial Computer(compatible with Windows 7 OS, xpc target supported LAN Interfaces and PCI Data Acquisition Board)
I connected the Humusoft Analog Input block to the xpc target scope. And whenever i run the simulink model, the following error appears:
*Initialization commands cannot be evaluated.
Caused by: Invalid range value: valid range values are -10*
Has anyone encountered this kind of issue before? If yes, is there a way to debug this problem?
Please give me your feedback regarding the above mentioned query!

回答(2 个)

Suneesh
Suneesh 2014-3-7
I am assuming it is the AD512 block. What value are you setting the 'Range vector' mask parameter to? The error you mention will be seen if it isn't one of the valid values for input range as mentioned in:

Sriniwas@AT
Sriniwas@AT 2014-3-10
Thank you Suneesh for your immediate reply. Actually, i am using the AD622 block. I couldn't find any 'Range vector' as mask parameters. The mask parameters of the block are the following:
1) Channel 2) Sample Time 3) PCI Slot
Assuming this 'Range vector' mask parameter setting would be present with the AD622 block as well. To investigate the problem, i am unable to access the Mathworks link which you mentioned in your reply. Because, I haven't added any license to my Mathworks account. I will try to figure it out how to access the Mathworks link which you have sent to me.
Thanking You,
BR, Sriniwas
  2 个评论
Suneesh
Suneesh 2014-3-10
The AD622 block has 'Range' but is hidden. The value of that parameter is set to '-10' in the shipping library. Perhaps this has been changed inadvertantly. Check this first by: 1. Selecting the AD622 block in your model. 2. With the block being the highlighted block execute the following at the MATLAB prompt:
get_param(gcb, 'Range')
If this does not return [-10] then that is the cause for the error. you may use SET_PARAM to set it to the correct value.
Also, I think to access MathWorks documentation online you just need to register.
Sriniwas@AT
Sriniwas@AT 2014-4-1
Thank you sunnesh for your response. I selected the AD622 block and ran the command get_param(gcb, 'Range') in the Matlab command prompt. The following is the result:
>> get_param(gcb, 'Range')
ans =
[-10]
The above result matches the input range of AD622 PCI Data Acquisition Card. It seems that this 'Range' parameter is not the cause behind the error.
Still trying to figure out the cause behind the error!

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Multicore Processor Targets 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by