Jump to content

Damian

UniStream & UniLogic Beta
  • Posts

    534
  • Joined

  • Last visited

  • Days Won

    13

Posts posted by Damian

  1. Im still not clear on how to allocate a particular socket to port 3, some advise on that would be great.

    Are you talking about physcial port 3 (aka the ethernet port you installed) or "Well-Known" port 3. If it is the former, then that is no necessary. Your "software" sockects will all connection through the same physical hardware port. If you are talking about "Well-Known" port 3, I can't image why you would want to be using that.

    Please clarify.

  2. Hi everyone,

    I have problem and I need suggestion. I have to control room temperature with one motorized valve and I have only two digital outputs and room temperature sensor. I don't have analog position of the valve or digital inputs for opened or closed position.I want to use PID with or without PWM but I don't know how to do it. How to convert analog output of PID to impulses for open or close comand? Is it possible at all or I have to use simple comparison logic with dead band and open/close/pause times?

    Thank you!

    Hi Shargy,

    I had a little bit of difficulty understanding your question, but based on what you have said I don't think PID is a good option for this. Your probably better off using good old fashioned limit control.

    I think you are implying that you have no means of feedback on your motorized valve. Does it at least cut itself off if you move it all the way in one direction?

    If so, in the crudest method possible, I see you as setting up an ON and OFF thrshold. If the temp falls below the min threshold, you turn on and output and run the valve all the way open (I assume you are controlling Heating and not Cooling). Once the temp gets above the Upper threshold then turn the other output on and run the valve all the way in the other direction. Have the two outputs interlocked so that they do not stay on simulataneously. You should "time" both motions for the max travel time. (ie. If you know that the valve can go from open to close in less than 6 seconds, then put a timer in such that output will only stay on for at max 8 seconds.

    Without positional feedback or a definitive signal to valve position relationship, I don't see how you can do this any other way. I also don't even think this example I have given you is a very good method either.

    Hopefully maybe someone here can offer better advise.

  3. The function calls for this driver are not very well documented. They usually try to push everyone off on the .NET version.

    On the ladder end, all you need is PLC Name FB, a TCP/IP CARD INIT FB, and a TCP/IP Sock INIT FB.

    I am going to give you some good values you start with. I should stress that you don't necessarily NEED to do it exactly as I have, but it will match well with the example I am giving below.

    Name the PLC "V130"

    Init the card to whatever IP address you want.

    My example used

    IP: 192.168.1.10

    Subn: 255.255.255.0

    GTWY: 192.168.1.254

    Initialize socket #3 to

    TCP

    Port D# 20257

    Slave

    Put all three of these FBs in the first network of you main ladder all in series and triggered by the SB2 contact.

    That is all you should need to do on the ladder end for base communication.

    If you leave socket#2 at default, you will be able to also continue to use Visilogic on port 20256 so that you can do both simultaneously.

    Downloading programs over Ethernet is much faster than RS232, so since you will have an Enet card on this anyway you might as well take full advantage of it.

    Anyhow, with that being said, here is a sample function in VB to invoke an Ethernet connection.

    You can ignore the parts that are related to serial comms.

    Private Function prvOpenPort() As Boolean

    Dim eComParam As tPC_CommSettings

    Set mComDriver = New UnCmDrv1.clsCommDriver 'Create a new instance of Unitronics CommDrive DLL

    'Configure the connection parameters.

    With eComParam

    .Baudrate = eBR_38400 'baud rate

    .DataBits = eDB_8 'data bits

    .Parity = eP_None 'parity

    .StopBits = eSB_1 'stop bits

    .TimeOut = 500 'communcations timeout

    .Retries = 3 'number of retries

    End With

    With mComDriver

    .Comm_Autodetect = True

    .ShowCommMessages = True

    .Comm_TimeOut = 10000

    .Comm_Retries = 3

    .Ethernet_Protocol = UnCmDrv1.enEthernetProtocol.eEP_TCP

    .Ethernet_RemotePort = 20257

    .Ethernet_RemoteIP = "192.168.1.10"

    If Not .Ethernet_Connect Then

    MsgBox ("Com Open = False")

    End If

    End With

    mComDriver.Comm_Autodetect = True

    mComDriver.ShowCommMessages = True

    prvOpenPort = mComDriver.Ethernet_Active

    End Function

  4. can anybody help i am having a problem with the socket connect on a 570 i have initialised the tcp/ip card and initialised the socket.

    I am connecting to a Lan router which has internet connection, i have set the subnet mask to 255.255.255.0,the ip is set to the ip of the router in the tcp/ip card init. What do i set the default gateway to???

    The socket initialisation is set to the master with a port number of 20256 protocol tcp.

    When i set the socket connect idont get a connection according to SB 147, i have set the socket connect with the ip of my outgoing mailserver and port 25.

    Any help please!!!!!!

    Cheers Andy

    Hi Andy,

    In addition to the great advice Ryan gives you hear it may also help to it might also help us to know more about what your application is.

    Are you simply trying to send out emails? What kind of setting does you server support? You may want to look through the example programs first.

    If you haven't already, you will also probably want to use the NAME function block to give you PLC a name.

    Are you programming the PLC over a serial connection or the Ethernet connection.

    I assume you are using Socket #2. You may want to setup on a socket other than 2 since Socket #2 has all the default config for easy connection via Visilogic.

    The help file in Visilogic also does a great job of explaining the IP, Subnet, and Gateway. Judging by what your asking, it will be much to your benefit to spend the time reading through these before you dive in too deep.

  5. "Num to String" or "Num to Ascii"?

    If you are using an MI you could only possibly have 5 digits in your number 00.000 since the max value of an MI is 2^16.

    Assuming you are using num to Ascii, you could just alter the high byte of the second MI in you ASCii array.

    So if you went Num to Ascii into for example MI20, since the characters are byte packed your "." will be in the high byte of MI21 assuming you always keep it to three decimal places.

    First do an AND with MI21 with hex 0F to "erase the "." and then just ADD hex 2C00 to MI21.

  6. Thanks for staying with this post. I dont believe i have monitored M18 and 10 for errors. I am not using MB27 or MB3 for any other functions within the program. The first move is not really supposed to complete, it is supposed to see the sensor before completion. Once the sensor is tripped we overwrite the previous PTO command with the one to terminate the move. We are not detecting the end of the move by any feedback device the move is completely open ended. Heres the puzzling thing - the code and stepper system system works perfectly at just about every speed from 3000 up to 18000 pulses. I noticed this condition while testing random speeds - so yes works great at higher speeds. When it overshoots it appears to be relatively conistent, but the overshoot is huge. for example my second move is 1/2 inch it overshoots anout 8 inches. My stepper resolution is set to 1600 PPR and can accept up to 200kHz. I have attached the program for you to evaluate. Maybe there is a better method??? Also, the program altered from the original in which i subract 11 from the first move's velocity decreasing the chance of the issue, but i would like to eliminate if possible. I have posted another entry in the forum asking in more detail for help with programming.

    thanks,

    Joe

    Hi Joe,

    I tried to run your program on my V130, but unfortunately mine does not support the motion blocks.

    Even though your move is "open loop" it would still be a good idea to use the MB bit for the second move to determine when it has completed sending out the pulse train. This will at least prevent an overshoot from re-invoking another move. I still think it is worth looking at the MI status registers to see if they are giving you some kind of information. You may find for example that at the magic speed that is giving you issues is also giving you some sort of error such as "out of range" or "Currently in Motion". You may find that the registration move is never actually happening at all and that the overshoot is really just the original move coming to completion, since that is setup as an index as well.

    Damian

  7. I feel a bit stupid, but what do you mean with "system file versions"?

    OS is Win7 64 bit

    He means the OS installed on you V1040. If you go to [Connection > Communication & OS] and click on the fourth tab, which I'm guessing is supposed to look like an eyeball, you will be able to check what version is on the PLC.

    Under the help menu there is a Check for Updates sub menu. Inside that is an option to check for the most recent OS available. If your not using the most recent one, it is probably best to go ahead and do so.

  8. Hi Damian,

    I hear you about the size. The issue has been raised, and I will raise it again.

    In the meantime, we have added this SB, and I hope it is of use:

    SB 249: Black Background.

    Applicable when a system screen such as Alarm or Info does not stretch across the entire screen.

    Set /Reset By user application

    Takes effect when screen is refreshed.

    Hi Cara,

    SB249 was a big help! I like that a lot better.

    Thanks,

    Damian

  9. thank you for the reply. I had thought that there may be an issue as you desctribed so i performed a test in which i took the motor and driver out of the system and just let the plc pulse while watching the PTO Status. It is interesting because the same thing happens i activate the first jog move with a speed of 8650 and manually trigger the sensor and it dramatically overshoots the target distance. when i use a speed of 8649 it works perfectly.

    Hi Joe,

    I appologize. I did not read your original post very carefully. What you explain does sound a bit puzzling.

    Have you monitored MI18 and MI10 to see if you get any errors? I don't see where you use MB27 or MB3, how are you detecting the end of the registation move (ie when motion is complete).

    What happens when you increase the speed by on increment? Are there any speeds above 8649 that work?

    Is it overshooting a consistent amount or is it all over the place?

    Do you have the ability to count the pulses?

    What is your stepping resolution?

  10. Stepper motor/drive systems suffer from natural resonant frequncies at which they do not run very stable at. Usually you have to actively avoid the first two major harmonics. The first harmonic is usually at a low enough speed that it is standard practice to jump directly to a minimum frequency that it above that harmonic. The other one is usually found empirically. So you'll want to program a skip over that frequecy. The code could get complicated.

  11. Are there any plans on making the canned alarm screen pop-ups sized properly for the V1040?

    Right now, because of the resolution, It even smaller than it is on the V570. This is VERY difficult to explain to customers.

    And ........... If it is going to stay a small "sub-window" pop up, it really needs to have some sort of border. The background color of the alarm pop-up just happeded to be the same background color I used o each and every one of my screens (the default). Now when the alarm screen pops up it looks bad because it blends in with my background and just blotches out whats behind it. A border would at least give it a sense of being a window.

  12. I know it has been complained about already, but just to blow some more oxygen on the fire (we really need a zoom for the V1040 HMI development. Seriously, I can't even see what I am doing things are so small. Especially when you are up converting a screen.

    It would also be very, very nice if you could select how things are scaled instead of stuffing up in the top left corner. It is taking me forver to rebuild screens. Almost as much time as it took to make them in the first place.

  13. I have many of my string displays selected as "center center" justification. On the string the display though, the strings to not appear center justified.

    I suspect what is happening is that the string is being justified based on the configured string length as opposed to the actual string length.

    Therefore if I have a list where:

    orange

    kiwi

    pomegranite

    black raspberry

    etc.

    I have to have say a configured 16 character string to account for the largest names. However, that makes the display of the shorter texts like kiwi look a little silly.

    It would be nice if the string display truncated any consecutive spaces counting from the string length back to the first non-space character. This would help the display look a little less funky. Maybe it could be another option you can select with a check box?

    This is also true for the units text inside a number field. It causes un-intuitive things to happen with how the justification is displayed.

  14. As a follow up, I had the need to re-enable this custom Visilogic Navigation Panel. It seemed to give me visibility of all the folders I needed. However I quickly found out why I turned it off. In thumbnail mode it takes a long time to generate the thumbnails (5-10 seconds). Each click on the scrollbar re-starts the process. During this time, the HDD doesn't do much, but one of my CPU cores goes to 100% activity. Looking again today, the speed is OK when navigating the standard Unitronics image library. However if I go to one of my image folders, that contain photographs, that's when the time blows out. Presumably this is becuase the Unitronics image lbrary contains images with small file size, in comparison to photos.

    FWIW I am running WinXP SP3 with a core2 Duo CPU, 2.2GHz with 3GB of RAM. The standard windows file picker in thumbnail mode updates much faster (less than one second), regardless of whether there were photos involved or not.

    I was having similar issues myself running on Win 7 Ult on a core i7. I don't use pictures much so it doesn't have much opportunity to aggravate me. Hopefully the new version will be out soon so that I can either turn that feature off or that it at least works properly. Mozes never did clairfy whether the problem they were fixing was show all the missing folders, or to fix the problem I have with not being able to turn the feature off as you have done.

×
×
  • Create New...