|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Accessing groups of variables
Hello All,
Is there anyway to access an entire group of variables in one statement? I was thinking maybe it would be possible with arrays, but how can you set all of the elements at once? Using a structure maybe? The reason I'm asking is that I want to access all of the OI's LEDs at one time instead of wasting valuable time on all 8 seperately. In assembly, accessing a full port is a snap, and I would think it would be easy enough in C. Thanks! ~Zack Team 1652 |
|
#2
|
|||||
|
|||||
|
Re: Accessing groups of variables
Quote:
Since you're specifically asking about the OI LEDs, take a look through the definition files in the default code from IFI. The individual LED bits are already part of a structure that you ought to be able to set directly. |
|
#3
|
|||||
|
|||||
|
Re: Accessing groups of variables
Specifically for the OI LEDs, if you look in the default code you'll see where all the 8 OI LED bits are addressed at once in user_routines.c at the very end. Ypu should backtrack as Alan suggested to understand why this is so.
Code:
User_Mode_byte = backup_voltage*10; Last edited by Mark McLeod : 27-11-2005 at 19:41. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| User Groups | Brandon Martus | CD Forum Support | 10 | 08-03-2004 15:31 |
| Need help with Variables ? | David Bryan | Programming | 5 | 23-02-2004 07:42 |
| Joystick Variables | fred | Programming | 8 | 20-02-2004 10:58 |
| VB Program to monitor robot variables | DanL | Programming | 7 | 15-02-2002 22:35 |