Hi John
One more comment on this topic…
It is of course also possible to use the AnyInputFile instead of the
interpolation function when you read in the data, this would be more elegant
solution.
The solution would look almost the same only the “datafun” changes…
AnyInputfile datafun = {
FileName = “MCP_data.txt”;
};
Best regards
Søren
From: anyscript@yahoogroups.com [mailto:anyscript@yahoogroups.com] On Behalf
Of AnyScript Support
Sent: 21 October 2008 10:05
To: anyscript@yahoogroups.com
Subject: RE: [AnyScript] Modification of Joint Driving File
Hi John
Yes this is possible 
It can be done by reading in the data into an interpolation function and
then use its data in the driver function. When you refer to the data you
have the chance to change the sign etc…
So it would look something like this:
AnyFunInterpol datafun =
{
FileName = “MCP_data.txt”;
Type = Bspline;
BsplineOrder = 4;
};
AnyFolder Drivers = {
AnyKinEqInterPolDriver MCPMotion = {
AnyUniversalJoint &Jnts = Main.Model.Jnts.MCP;
Data=-1234565767*.datafun.Data; //here you can change the raw data…
T=.datafun.T;
Type = Bspline;
BsplineOrder = 4;
Reaction.Type = {Off,Off};
}; // MCP driver
Hope it was something like this you were looking for.
Best regards
Søren, AnyBody Support
From: anyscript@yahoogrou <mailto:anyscript%40yahoogroups.com> ps.com
[mailto:anyscript@yahoogrou <mailto:anyscript%40yahoogroups.com> ps.com] On
Behalf
Of johnzengwu
Sent: 20 October 2008 22:36
To: anyscript@yahoogrou <mailto:anyscript%40yahoogroups.com> ps.com
Subject: [AnyScript] Modification of Joint Driving File
Hi Søren:
I have a small question regarding the drivers of a joint.
I drive a joint using the data from experiment, e.g.,
AnyFolder Drivers = {
AnyKinEqInterPolDriver MCPMotion = {
AnyUniversalJoint &Jnts = Main.Model.Jnts.MCP;
FileName = “MCP_data.txt”;
Type = Bspline;
BsplineOrder = 4;
Reaction.Type = {Off,Off};
}; // MCP driver
MCP is a universal joint, with 2 DOFs; the “MCP_data.txt” is in a
form of “time, angle (rad), angle (rad)”. The model works OK.
My question: Is it possible to modify the anyscript code to vary the
drivers, without editing the driving file “MCP_data.txt”? For
example, I need to vary sign (-/+), change from deg to rad, or
magnify the variations in certain DOF, etc.
Thanks,
John Wu
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]