- 积分
- 0
- 注册时间
- 2008-9-2
- 仿真币
-
- 最后登录
- 1970-1-1
|
请教前辈,
我在做范老师书上的一个例子
目的是得到motion的IC DISPLACEMENT,我已经将fortran弄成dll文件
然后在admas里面调用
可是仿真时出现如下错误:
ERROR:
ERROR: Found an unexpected token while looking for an initial real argument value.
ERROR: Statement : MOTION
ERROR: Argument : ICDISP
ERROR: Error line text : ' MOTION/1,VELOCITY,ICDISP= -149.543352 ,FUN=90d[[<eol>]]'
ERROR: Error token text : '<eol>'
ERROR: Error token type : end-of-statement
ERROR: Initial displacement of MOTION model_1.MOTION_1 differs from that of
JOINT model_1.JOINT_1, on which it is located, by -149.54 degrees.
从以上错误中看到,ICDISP=-149.54,已经计算出度数了,和下面提示的是相同的,这个错误是出在什么地方啊?
以下是fortran程序
SUBROUTINE CONSUB(PAR, NPAR)
C
C === Type and dimension statements ===================
C
C Note: For machines with 60 or more bits per word,
C substitute "REAL" for "DOUBLE PRECISION".
C
C --- External variable definitions -------------------
C
INTEGER NPAR
DOUBLE PRECISION PAR( * )
C
C PAR Array containing passed parameters
C NPAR Number of passed parameters
C
C --- Local variable definitions ----------------------
C
LOGICAL ERRFLG
CHARACTER*80 COMMND
INTEGER STATUS, IPAR(2), IM, JM
DOUBLE PRECISION DIS2, WEI
C
C === Executable code =================================
C
C --- Initial static analysis -------------------------
C
C
C
IM = PAR(1)
JM = PAR(2)
C
IPAR(1) = IM
IPAR(2) = JM
CALL SYSFNC('AZ', IPAR,2,DIS2,ERRFLE)
WEI=-DIS2*57.2958
C
C --- Change the IC DISPLACEMENT of ERRFLG ---------------------------
C
WRITE (COMMND,100) 'MOTION/1,VELOCITY,ICDISP=',WEI,',FUN=90d'
CALL MODIFY(COMMND,STATUS)
100 FORMAT(A27,F16.6,A10)
C
急等回复 |
|