Jump to content

strange error in simple labview program


Recommended Posts

Hallo, I want to make a labview program that can store the coordinations / route of the mouse, but only went the mouse is in a xy-plot area. But now I have run into a strange error. (I have attached my labview program so that you can see for your self). When the horizantal coordination are lower then the coordinations of the the xy graph the calculated new mouse horizontal coordination is rised by 4294967296. There are two funny things: this number is 2 times the max of an I32 and if I replace the xy-graph coordinations by an constant there is no error.

Does anybody know what this error is about.

thanks,

Andries

Link to comment

QUOTE(Rimmergogo @ Mar 1 2007, 01:27 PM)

Hallo, I want to make a labview program that can store the coordinations / route of the mouse, but only went the mouse is in a xy-plot area. But now I have run into a strange error. (I have attached my labview program so that you can see for your self). When the horizantal coordination are lower then the coordinations of the the xy graph the calculated new mouse horizontal coordination is rised by 4294967296. There are two funny things: this number is 2 times the max of an I32 and if I replace the xy-graph coordinations by an constant there is no error.

Does anybody know what this error is about.

thanks,

Andries

I fixed the problem already by substracting 4294967296 from the horizontal value wen it is above 2000. but still the bug remains unclarified.

Link to comment

QUOTE(Rimmergogo @ Mar 1 2007, 01:44 PM)

I fixed the problem already by substracting 4294967296 from the horizontal value wen it is above 2000. but still the bug remains unclarified.

Since the value you get from 'Y Scale.Bounds:Width' is unsigned, the output type of following addition and the top subtract operation (Horizontal) will be unsigned.

Changing the output type from the addition to signed long (with a 'To Long Integer' conversion) solves the problem.

-Mikkel :)

Link to comment

QUOTE(Mikkel @ Mar 1 2007, 03:02 PM)

Since the value you get from 'Y Scale.Bounds:Width' is unsigned, the output type of following addition and the top subtract operation (Horizontal) will be unsigned.

Changing the output type from the addition to signed long (with a 'To Long Integer' conversion) solves the problem.

-Mikkel :)

Now I see the problem.... thanks a lot. This part works fine now and now I can continue :arrow: .

Andries

Link to comment

QUOTE(Rimmergogo @ Mar 5 2007, 09:48 AM)

I want a LabVIEW icon under my name!

Shit not yet. heheheh

May I suggest, that you try participate in a constructive manner in stead of replying to your own posts? :thumbdown:

This is - by far - the easiest way to get an icon under your name.

-Mikkel :)

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.