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

8 views (last 30 days)
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!

Answers (2)

Suneesh
Suneesh on 7 Mar 2014
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 on 10 Mar 2014
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 Comments
Suneesh
Suneesh on 10 Mar 2014
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 on 1 Apr 2014
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!

Sign in to comment.

Categories

Find more on Multicore Processor Targets in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!