pls help me verify my code not work, why???


Closed Thread
Results 1 to 2 of 2

Hybrid View

  1. #1
    Join Date
    May 2005
    Posts
    70


    Did you find this post helpful? Yes | No

    Unhappy

    Ok ,my problem was resolve by we remove If founction out,

    code:

    Case 11 'Read save data
    ' If sw_up = 0 Then
    sw_Mode_data = 0
    sw_up_data = 0
    sw_down_data = 0
    Read DATA_save_ADDRESS,DATA_MOTORx
    If DATA_MOTOR > DATA_MOTORx Then
    'n = 13 - 2 = 11
    N = DATA_MOTOR - DATA_MOTORx
    GoSub MOVE_down 'load data
    EndIf
    ' Else
    sw_Mode_data = 0
    sw_up_data = 0
    sw_down_data = 0
    ' EndIf
    Case 12 'Read power data
    ' If sw_down =0 Then
    sw_Mode_data = 0
    sw_up_data = 0
    sw_down_data = 0
    Read DATA_power_ADDRESS, DATA_MOTORx
    If DATA_MOTORx > DATA_MOTOR Then
    'n = 50 - 8 = 48
    N = DATA_MOTORX - DATA_MOTOR
    GoSub MOVE_up 'load data
    EndIf
    ' Else
    sw_Mode_data = 0
    sw_up_data = 0
    sw_down_data = 0
    ' EndIf
    Case 21
    ' If sw_up = 0 Then
    sw_Mode_data = 0
    sw_up_data = 0
    sw_down_data = 0
    DATA_MOTOR = DATA_MOTOR +1
    Write DATA_save_ADDRESS , DATA_MOTOR
    ' Else
    sw_Mode_data = 0
    sw_up_data = 0
    sw_down_data = 0
    'EndIf
    Case 22
    ' If sw_down = 0 Then
    sw_Mode_data = 0
    sw_up_data = 0
    sw_down_data = 0
    DATA_MOTOR = DATA_MOTOR +1
    Write DATA_power_ADDRESS , DATA_MOTOR
    ' Else
    sw_Mode_data = 0
    sw_up_data = 0
    sw_down_data = 0
    ' EndIf
    Last edited by chai98a; - 18th January 2010 at 09:51.

Similar Threads

  1. Minimizing code space
    By Tobias in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 30th May 2009, 07:25
  2. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 08:26
  3. Code: Why is this code greater than 2000 words?
    By DrDreas in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 1st June 2007, 19:51
  4. Please help ? RF Remote Source code
    By sorasit46 in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 25th April 2007, 14:40
  5. Replies: 1
    Last Post: - 31st August 2005, 20:00

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts