What can we help you with today?

Log in and chat with a service agent now! Check out our help button in the bottom right corner!

[E3 Pins] AssignTo Questions

Comments

4 comments

  • Avatar
    bob larranaga

    your code is difficult for me to comprehend. the if-statements has a complex math on right-hand side. this is difficult to debug. why not convert it into a variable to see the calculation?

    i haven't scripted with terminals nor do i have much experience with designs using them. are you trying to name the pins on the terminal pin as U,V,W,E? or name each terminals?

    in your image of the device tree, you have TB4#1 which is a view. do you know if the objE3Dev is set to a device (no view) or device-view? my suspicion is that you might not be able to assign a pin when its device-view. you might need to get the original ID.

    on line 17311, do you know for certain that intTerID is valid? I would add the following to debug what is going on. when it shows an error message in the output window, click on the line and see what where it jumps in the device tree. 

    Dim dbg as Integer = objE3Pin.AssignTo(objDevPinIds(intTerID)
    If dbg <> 1 Then
    app.PutError(0, "intTerID: " & intTerID, intTerID)
    End If
    0
    Comment actions Permalink
  • Avatar
    Kelly_Li

    Hi Bob,

    Thank you for the reply, and sorry for my code being hard to understand. I've added more comments to it. BTW, It's my first time to code the pin things, too. :D

    To answer your question, yes I am trying to name the pins on the terminal pin as U,V,W,E.; the objE3Dev is set to a green device(no view). BTW, I did't understand your suspicion(might not be able to assign a pin when its device-view...get the original ID???) Could you please explain more? Thank you very much.

    Here is the picture with new comments. Hope it is easier to understand. Because under the yellow circle, all the pin would be the same name, to code easier, I get the fourth ID of all pins(objDevPinIds)

    The first For Loop would run the green device, so when it get to the second run, it would run to E(the second green square)

    Maybe my logy is wrong, or the same method to assign the UVW of the first device working out but the second green device failing is very strange... 

    0
    Comment actions Permalink
  • Avatar
    Paul Bloom

    Putting the code aside, the part might be set up in the DBE to not allow an assignment for that pin.  Simply looking at the color of things in your device tree, this could be the case.  (i.e.  Dark blue usually means something can be renamed while yellow pins cannot)

    0
    Comment actions Permalink
  • Avatar
    Kelly_Li

    Hi Paul,

    Thank you for the reply! The "device tree" picture in my last post is what I am stuck with and is what I've done. It is in the half road...  

    Originally there are four green square devices. The question is I only need four yellow circle symbols(U,V,W,E), that is to say, I only need two green square devices. But because of the device view, I cannot combine the yellow circles into only two devices. What I did first is to delete the device view, then combine the yellow circle symbols, and then finally put back the device view. The final phase is what I am stuck with right now: to assign the pins back to the device view that I just put back.

    Here is the original picture:

     

    The picture below is after deleting the device view, combining the yellow circle symbols, and putting back the vacant device view↓

    Then getting back to the picture of my first post. I have successfully assigned the first three yellow pins, but left the fourth pin unassigned...

    Sorry Paul, I did not tell the whole story in my first post. I think the four pins of the device view could be assigned but we haven't find a way to assign. What do you think?

    0
    Comment actions Permalink

Please sign in to leave a comment.