Jump to content

linxchas

UniStream & UniLogic Beta
  • Posts

    70
  • Joined

  • Last visited

  • Days Won

    4

linxchas last won the day on June 29 2013

linxchas had the most liked content!

1 Follower

About linxchas

Profile Information

  • Gender
    Not Telling

Contact Methods

  • Skype
    linxchas

Recent Profile Visitors

5,080 profile views

linxchas's Achievements

Advanced Member

Advanced Member (3/4)

9

Reputation

  1. Hello,

    My name is Maxi, nice to meet you.

    I read some of your publications about NMEA 0183. I tried to download an example, but I could not.

    Do you share me this example?

    Thank you in advance.

    Best regards.

    Maximiliano Salomón

  2. Here is 2 years old topic were i posted sample code-NMEA-350 (link from my dropbox, If the file that you downloaded has an extension .zip, just replace it to .vlp. Than you'll be able to open it in Visilogic). http://forum.unitronics.com/index.php?/topic/1504-use-pointing-to-filter-data-from-rs-232-input/?hl=gps#entry5068 Hope it will help.
  3. You have 3 ways to get the remote access to PLC thru internet: The easiest is remote access to the computer in same network as PLC - for example TeamViewer. Just install Visilogic on this machine and you are ready to go. Port Forwarding in the router which belongs to the remote network. Here you'll need IT assistance. Listen mode. (see topic 7780). The most complex, but the best way in case of enterprise application, when you'll need maintain connections to many PLC's (2500 in my case).
  4. Here is tiny server application (C#2008) which is stays on public IP, connected to SQL and distributes data between hundreds of PLC'c: https://dl.dropboxusercontent.com/u/61256880/Unitronics/VL_Connect.7z This link to Visilogic subroutine that actually executes PLC client function: https://dl.dropboxusercontent.com/u/61256880/Unitronics/GetPortNumber.7z
  5. Here the "old times" Unitronics examples for Excel and VB6. https://dl.dropboxusercontent.com/u/61256880/_CommDriver%20Example.zip Did not find it on the new Unitronics website, so I attached the copy from my archive. PS: You can use the only 32-bit Excel
  6. In addition to the logic that you already have, I would recommend you to select one controller that will lead, control and synchronize the process.Otherwise you can fall into egg and chicken loop.
  7. You need to write application and modify your PLC project. There is many ways to do that. The best way depends on your specific requirements. I have similar server application that distributes data from SQL across hundreds of V-570 PLC's: each controller connects to the server on port 20257 once per 5 min, provide his ID and receives relevant data.
  8. Joe, have not find anything wrong in your test, I have similar code and it works without any problems. Only 2 advises: 1. try to avoid binding UDP sockets to ports 20000-20255 2. initiate socket every time prior to calling DNS server and bind it to different port. By using same source port you may hit "Unidirectional Link Detection" implemented in the most of switches
  9. From visilogic menu try Build>Build All, then download project again. From my experience, Modbus never works well after conversion without rebuilding the project.
  10. In the case of Port forwarding, PLC works the same way as any other PC. If you set correctly PFW in the router, and you can connect to PLC locally but not externally, than the most common mistake is wrong Gateway address in PLC. Some networks may have multiple gateways (ex: Data & Voice). you have to set PLC to the one, you are using for port forwarding. P.S. Ping is useless to diagnose forwarded devices. The response comes from the router, not from the device.
  11. I was assuming that the output message is all ASCII. If your string is ASCII with control characters in <>, and ASCII variables in [ ], then yes - you are right and your line should work. The only concern is a blank space before <STX>. But you can remove it with vector "Shift Left" under vector menu: For test you have 2 options: 1. PLC info mode: Go to Info Mode->Ethernet->Monitor. Select "Port 2" and you will see every incoming and outgoing packet in ASCII or binary.(In this case you will need to trigger transmission from visilogic debug mode since the display will be used as monitor) 2. "Wireshark" on your PC. Go to http://www.wireshark.org/download.html install your version and run the program set the filter as "udp.port == 20257" select network interface and click "Start" You will see all packet broadcasting by PLC to port 20257
  12. You are right about UDP RAW Encoding is easy, try to use 'Create Excel delimited line" under SD menu (see attachment) Socket 2 init is correct, Socket 1 init is not necessary, but I would add it as well for cases when backup battery is fails. I did not test my suggestion, so if any questions, please reply Good luck
  13. OK, here is how standard Modbus slave looks: And here how ModBus SCAN can be in your own code (Example for Modbus over TCP, but UDP would be very much the same): Subs 1.ProcessModbusRequest and 3.ComposeModbusResponce should be written based on Modbus protocol description. Modbus is a public protocol and description you can find on http://www.modbus.org/docs/Modbus_Application_Protocol_V1_1b.pdf In the sub 2.ValidateModbusRequest you should put your specific validation requirement. No doubts, this it is a piece of work. But it doable. So you should consider, if your project worth of it. You'll probably need a bit of Unitronics help in matter of exact modbus version implemented in the controllers (especially addressing). Reverse engineering (sniffer) will be helpful as well.
  14. From my point of view, the only way to restrict ModBus slave from "unauthorized" requests is to reproduce "ModBus SCAN" in your code using TCP or UDP RAW protocol. Then you can add "Request validation"
×
×
  • Create New...