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
#

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.

Math function problem

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

12-06-2018 04:04 PM - edited 12-06-2018 04:11 PM

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

Re: Math function problem

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

12-06-2018 04:12 PM

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

Re: Math function problem

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

12-06-2018 05:25 PM

Hi BenBroad,

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

Re: Math function problem

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

12-06-2018 11:22 PM

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

Re: Math function problem

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

12-08-2018 05:31 AM

It is still wrong...

Follow Siemens PLM Software

© 2019 Siemens Product Lifecycle Management Software Inc