|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#3
|
|||
|
|||
|
Re: Variable rollover with Labview (suggestions?)
I'm having a little trouble following exactly what you are trying to accomplish: could you provide example inputs and what you want as an output?
I've included a few options, all assume that rollover is 100. Which of the following behaviors is correct? 1) 112 becomes 12 2) 112 becomes 100 Another interpretation: You have a variable x, and you are incrementing or decrementing by dx. You want output to "latch" to either extreme if you would otherwise roll. x=98, dx=5, output = 100 x=98, dx=70, output = 100 x=3, dx=-5, output = 0 Perhaps pulling dx into your function would make it easier, as you can use it's sign without having to guess. Also, would it help to temporarily use a 32bit int to avoid overflow, and then truncate back down? |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problems with CMUcam & LABView | Daniel_H | LabView and Data Acquisition | 1 | 30-01-2006 12:07 |
| Problem with freezing frames in LabVIEW | pdc | LabView and Data Acquisition | 2 | 26-01-2006 01:34 |
| Problems tracking with CMUCam2 in LabVIEW | PhilBot | LabView and Data Acquisition | 5 | 17-01-2006 20:42 |
| Need help with 255 Variable | Joseph F | Programming | 18 | 26-02-2002 14:49 |