turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Navigation
- NX Design
- Forums
- Blogs
- Knowledge Bases
- Groups

- Siemens PLM Community
- NX Design
- NX Student Forum
- Math function problem

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Highlighted
#
##### Math function problem

if(disp_x<=100 && disp_y<=20) then (0) else(if(disp_x<150 && disp_y<100) then (3) else (0))

where disp_x and disp_y are the names of sensors and [0,3] are the angular output values for the joint.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Thursday - last edited Thursday

Hello,

first of all I want to apologize if i wrote this in a bad spot but i really do not know where to ask for it.

first of all I want to apologize if i wrote this in a bad spot but i really do not know where to ask for it.

I'm making a motion simulation in NX11 where I want my car wheels to turn as soon as it reach marker.

My idea was to control the turn through an if/else function right on this path: joint->driver->math functions.

Input would be the absolute displacement in X and Y axis from

My idea was to control the turn through an if/else function right on this path: joint->driver->math functions.

Input would be the absolute displacement in X and Y axis from

created sensors and the output would be the angle, for example:

if(disp_x<=100 && disp_y<=20) then (0) else(if(disp_x<150 && disp_y<100) then (3) else (0))

where disp_x and disp_y are the names of sensors and [0,3] are the angular output values for the joint.

Every time i try to do it i recive a message "The math function definition is invalid".

If someone can halp me I will be really gratefull.

4 REPLIES

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Thursday

Hi @Maestro_Rafaelo,

I'm not familiar with the Motion application, but just looking at your syntax and knowing what the NX Expressions editor would reject/allow, I'd suggest trying the following syntax:

if(disp_x<=100 && disp_y<=20)(0)else if(disp_x<150 && disp_y<100)(3)else(0)

Regards, Ben

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Thursday

Hi BenBroad,

thanks for your reply, unfortunettly it still do not work.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Thursday

Hi Maestro_Rafaelo,

Please try below.

if(disp_x<=100 && disp_y<=20)(0) else(if(disp_x<150 && disp_y<100)(3) else (0))

Hope it helps.

Thanks,

Amol

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Saturday

It is still wrong...

Follow Siemens PLM Software

© 2018 Siemens Product Lifecycle Management Software Inc