Jump to content

markw444

Members
  • Posts

    11
  • Joined

  • Last visited

Posts posted by markw444

  1. (Mod edit, this Topic's solution at the bottom has been pinned under the "Ongoing...Topics almost worth pinning" Pin.)

    Hello,

    I apologize if this question has been answered; I've searched the forum and help files without any luck.

     

    I am missing the vertical scroll bar in the main window in VisiLogic. It has made editing very tedious, as there is no quick way to scroll through the rungs of my programs. I have tried uninstalling/reinstalling, deleting all registry keys that mention VisiLogic, and tried different user accounts on the same computer with no luck. I have also installed 9.8.80 from the same .exe onto two other computers where the vertical scroll bar does successfully appear. Unfortunately these were laptops that I cannot use as my main work computer. I have attached pictures with and without the scroll bar I'm trying to get to re-appear, shown while editing the same .vlp program (not simultaneously). So, the issue seems isolated to the computer and not the vlp file or user account on the computer. If anyone has experienced this issue before and found a solution, I would greatly appreciate the help.

    image.thumb.png.810f8d2550ba230897bc29719546ed54.pngimage.thumb.png.533d2f2a78442f5447369ef7d9bd98e2.png

     

    Thank-you in advance for any useful information,

     

    Mark

  2. Just as an update, I've put together a basic server that echos any information sent to it and have it running as a console application on port 502 on my PC. I also put together a console client application that connects to this server--I can successfully send information from the client application to the server application. I then tried replacing the client application with one of my Samba 7" units, hoping to see the packets coming through my network card. The Samba sets up the initial TCP handshaking with an address resolution request, to which my PC responds, and then the Samba just continually tries connecting. The connection never successfully occurs. 

  3. Thanks for your help Flex. The program does work properly, I pulled a stupid and was relying on what I'm seeing in WireShark--which monitors only the traffic into and out of my PC's network card, not any traffic occurring on the switch. I think I'll have to follow Ausman's suggestion and write up a program to listen on port 502 on my PC.  At least I now know the MODBUS master program works!

  4. Hey Flex,

    I updated the MODBUS configs in the program, but ended up with the same results: the Slave PLC doesn't respond to the master when the master tries connecting its Socket 3 to 172.16.0.1. I've attached new programs/capture screenshot. I apologize if this is something I should be contacting Unitronics for help with--please let me know if it's outside the scope of the forums.

    Thanks,

     

    Mark

    MODBUSmaster 1902220920.vlp

    MODBUSslave 1902220922.vlp

    WireShark Capture 1902220928.PNG

  5. Hey Aus,

     

    Thanks for the suggestion--I started to implement something along the lines of what you described and then thought I needed to have a PC process listening on the port number (502 for MODBUS) from the MODBUS master logic program--this would allow the TCP handshaking to occur. Not wanting to have to get into writing some code to create a server listening on port 502, I decided to hook two Sambas and my second network card into an unmanaged switch to make a small network.

    I made up a VisiLogic program for the MODBUS master PLC and one for the MODBUS slave PC, hoping to capture the communications between them with WireShark. For reference, the IP addresses on this network are 172.16.0.0/2.

    After setting the static IP of my second network adapter to 172.16.0.0, the IP of the slave to 172.16.0.1, and the master 172.16.0.2, I tried capturing the traffic in WireShark with the filter "ip.src==172.16.0.0/24 and ip.dst==172.16.0.0/24".  I first successfully pinged and captured traffic to and from both PLCs from my PC and then tried running the read data tables command from the master. Unfortunately, this didn't work--when connecting the socket in my Master's ladder logic, it made  a request to the IP address of the Slave for handshaking, but never received a reply. The attached screenshot shows the extend of the communications--two series of pings and the request from the Master. 

    I feel that this may be an error in my ladder logic--I've never programmed a Samba as a MODBUS master before. I've attached both programs with the hope that someone might see an obvious mistake I've overlooked. I appreciate any further help.

     

    Thanks,

     

    Mark

    WireShark Capture 1902220723.PNG

    MODBUSmaster 1902220704.vlp

    MODBUSslave 1902220720.vlp

  6. Hello,

    I apologize if this question has been answered; I've searched the forum and help files without any luck.

     

    I'd like to know where I can find information for MODBUS protocol to read  from Data Tables. For context I have about a dozen Samba 7" controllers networked and connected to my PC (MODBUS TCP/IP). I wrote a C# application that pulls data from all the controller  bits and registers with the standard MODBUS functions--everything works fine. Up until this point, the logic made minimal use of data tables, so I didn't have a reason to read data from them. Now, however, I need to read Data Table information.

    There is clearly a MODBUS function block for reading from data tables, but I haven't been able to find any information about the command sequence for this function that would allow me to implement it a Data Table read with a PC master. The "VisiLogic Software Manual: VisiLogic Function Blocks" make brief mention of the information I'm looking for:

    "Please note that this is not a standard MODBUS function. Read/Write from Data Tables is compatible with Unitronics' Vision PLC data tables only"

     

    Thank-you in advance for any useful information,

     

    Mark

  7. Hello,

     

    I'm attempting to set up a program for jogging a stepper motor using my Samba 7 unit. I'm using a separate stepper controller because the output from the Samba when creating a pulse train was too noisy for the stepper driver at high output current (motor ran smoothly at low current, jitters at high current). Because I'm not using the Samba to produce the pulse train, I have 4bits to work with when connecting to the stepper controller. The controller will have two input bits for movement--one for running the stepper forward and one for running it backwards. I'd like to have multiple settings on the Samba for controlling how far the stepper moves a translation stage. I've setup a data table with strings and corresponding timers for the various run times to store settings. I can store and update strings in the data table, but I'd like to run a timer while the user is running the motor forwards or backwards. My questions are: how can I time how long a user presses a button, and can I do arithmetic with the timer values, and how can I store the timer in the data table (the same as how I'm currently doing it with strings?).

     

    Tl;dr How can I time how long a button is pressed, can I do arithmetic with timers, and how can I store the timer in a data table.

     

    I apologize if these questions have been addressed in previous forum posts that I might not have found when searching for answers.

     

    Thanks,

     

    Mark

  8. Thank-you for the replies! I can now read the correct values from the MLs, but only if I query using a start address of 28672. The ML I'm attempting to read from is ML 3, which I would suppose would start at 28678. As a random test value, I set ML 3 = 73333. If I send a MODBUS query for registers starting address 28672 and length 10 (00 03 00 00 00 06 80 03 70 00 00 0a), I receive a response indicating register 28678 = 1e 75, and 28679 = 00 01, meaning that ML 3 = 00 01 1e 75 = 73333. I'm using both WireShark (which recognizes MODBUS commands/replies) and my own C# program to interpret the slave response. This matches what I expected. However, if I send a MODBUS query for registers starting at address 28678 and length 2 (00 03 00 00 00 06 80 03 70 06 00 02), I receive a response indicating registers 28678 and 28679 are zero (ML 3 = 0). I can simply parse the data as necessary, but I wonder why this occurs.

     

    Again, thank-you!

  9. Hello,

    I've successfully connected a small network of Samba HMI/PLCs, and have had my computer running a program to pull data through MODBUS TCP (computer is master, all Samba units are slaves). I can successfully pull data from any of the 256 MIs as their indexing starts at 0 in regards to function code 3: read holding registers. However, I need to pull data from one of the memory long values. I could copy the data into two MIs (as suggested on another forum post), but I would prefer not to in order to limit register use for future changes to my ladder logic. The help files list the starting pointer value for MLs as 5100 in Standard Vision products, but I could not successfully pull data using this as a starting address in my MODBUS commands. I have tried finding documentation regarding this question, but I may be searching in the wrong place. If anyone knows the starting index for memory long values in Samba units, I would greatly appreciate that information.

     

    Thanks,

     

    Mark

×
×
  • Create New...