Jump to content

Łukasz Klimek

Members
  • Posts

    3
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Łukasz Klimek's Achievements

Newbie

Newbie (1/4)

0

Reputation

  1. I tried a few things, including using a different ethernet cable and finally I figured it out. It's a little embarrassing but I plugged the PLC into the WAN port on my router by mistake. Sorry for wasting your time and thanks for your help
  2. Ok, so to clarify - I don't need to connect to VisiLogic, I'm fine with using a programming cable for now (unless I'm missing something obvious about this feature). My use case - I need to retrieve some files from an FTP server and print labels on a network attached printer. To do that I assume that the TCP_RAW mode is needed (since "MODBUS over TCP" doesn't sound like something I want). I admit that I'm very new to PLC programming, but I'm far from a newbie when it comes to programming in general. I want to start with the printer, since it's super simple - I have an IP of the printer, I have the port, I need to connect to it (client/master) and send 6 bytes of data to get something printed: "^II^FF". I already confirmed that this works with a python script on a PC, now I want to do the same with the PLC. After I get this to work I can worry about actually printing something useful and having configurable IP addresses :) First of all I should configure my router to assign a static IP for the PLC, so I need the MAC address - thanks for the tip about Info mode. I noticed it mentioned in the documentation before, tried to click the "i" button and it didn't work, so I just forgot about it. Now I tried again but I long-pressed the button instead and got in - the MAC is 00:0D:22:2F:A5:F8 so I was very close to getting it right. In terms of the program, I tried to: power-up pulse -> SET PLC NAME -> CARD INIT -> SOCKET INIT (socket 0, TCP_RAW, client) MB "should connect" -> card initialized -> socket 0 initialized -> socket 0 not connected -> CONNECT (printer IP, port) -> reset the "should connect" MB MB "should send" -> socket 0 is connected -> SEND DATA (^II^FF) I trigger MB's by hand to see it work. The result is that the "connected" bit for socket 0 never lights up. I have the MAC now, so I'll do more testing probably tomorrow. Also one more idea came to me when writing out the program above - it's possible that I didn't reset the PLC after downloading the program, which would prevent the CARD INIT and SOCKET INIT from running. In hindsight that should've been obvious... I'll get back to you after my next round of testing, hopefully with good news :)
  3. Hello, I would be grateful for some help with configuring the TCP/IP connection of the V130 controller. I have the V100-17-ET2 ethernet card in it and I did some initial attempts. So far I can see in the system bits that: SB 141 - card exists = 1 SB 142 - card initialized = 1 SB 143 - socket 0 initialized = 1 (that's the one I'm trying to use) SB 151 - ethernet status: link = 1 SB 153 - ethernet status: rate, 100 mbps = 1 For now I'm testing this right next to my PC, plugged to my home router and I'm trying to get anything to work. Right off the bat I see no DHCP, the card init block just asks me for a static IP. I could configure my router with a static IP for it, but I need the MAC address of the card - which turns out to be surprisingly hard to find. Nothing on the box, nothing in the box, nothing in the VisiLogic documentation that I could find. I found the (undocumented) SDW 22 and SDW 23 operands labeled as MAC Address, but I'm not completely sure how to convert them to a MAC address. What I tried so far is: SDW 22 = 573548024 = (hex) 22 2F A5 F8 SDW 23 = 13 = (hex) D MAC has 6 bytes, so I'm assuming that "D" from SDW 23 actually means "00 0D". I still don't know in which order the operands and bytes should be used to get the MAC address. As things are I'm struggling to do a simple ping, not to mention implementing the FTP operations and printing that I need to do. Like I said in the beginning - any hints/help would be appreciated.
×
×
  • Create New...