VB.net control arrays

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bharathi228
    New Member
    • Jul 2008
    • 28

    VB.net control arrays

    hi,

    iam doing a windows application.iam displaying values in the form at runtime.
    my requirement is from PLC iam retrieving 40 values like 0 and 1 s

    then iam displaying 1st 16 values into one textbox

    next 16 values into one textbox

    next 8 values into one textbox

    for example 010000000000000 1 ------ first textbox

    and one more thing is values are displaying from right to left

    ex : if 1st value is 1 then that is at starting at right


    in my previous code iam displaying one value into one textbox.

    now my requirement is like this

    my previous code


    Code:
    Dim intVALUE_INDEX As Short
    Dim intINVISIBLE As Short
    Dim intCEMCON As Short
    
    
    intCEMCON = mfrmANALOG_VALUES.CURRENT_CEMCON
    For intVALUE_INDEX = 0 To (muiiobufCEMCON(intCEMCON).ANALOG_INPUTS - 1)
    If intVALUE_INDEX > 45 Then Exit For 
    mfrmANALOG_VALUES.Label1(intVALUE_INDEX).Text = CStr(intVALUE_INDEX)
    mfrmANALOG_VALUES.txtVALUE(intVALUE_INDEX).Text = CStr(muiiobufCEMCON(intCEMCON).GET_ANALOG_INPUT(intVALUE_INDEX + 1))
    Next intVALUE_INDEX
    For intINVISIBLE = muiiobufCEMCON(intCEMCON).ANALOG_INPUTS To 45
    mfrmANALOG_VALUES.Label1(intINVISIBLE).Visible = False
    mfrmANALOG_VALUES.txtVALUE(intINVISIBLE).Visible = False
    Next intINVISIBLE

    so anyone help me with this code .please its very urgent.
    Last edited by kenobewan; Oct 1 '08, 12:59 PM. Reason: Use code tags
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    I don't understand how your question pertains to VB.NET arrays?
    How are you receiving your "Values" of forty 1's and 0's?
    Are they listed in a String, in an Array?
    Is your problem that you are displaying the values from right to left?
    Are you able to display the data?
    What have you tried so far to solve your problem?

    -Frinny

    Comment

    • joedeene
      Contributor
      • Jul 2008
      • 579

      #3
      ya, basically how are you getting the 40 numbers/integers returned to you ? or did you not accomplish this yet? because a simple string.split should give you the 3 sections(16,16, 8), respectively. uhm, but an array, still would be easy to convert, please explain more what you are trying to do, the RTL is simple too, we just need some information on how you are receiving your data, or are u having trouble receiving exactly 40 integers ?

      joedeene

      Comment

      Working...