phlorek Posted May 13, 2020 Report Share Posted May 13, 2020 Hello, I'm a complete beginner to the topic so I apologise in advance if my terminology is lacking. I'm trying to create a simple application using an Unitronics HMI+PLC SM70-J-T20. I have created necessary logic for the program to work, but now I'm at the point of trying to send signals initialized within the program to a Moxa E1212 I/O module. From what I have gathered, there is no way of operating on the I/O directly through VisiLogic and the only way of communicating with Moxa is through MODBUS IP and addressing of the I/O. I have set IP of the I/O module as well as the HMI according with my local network based of my computer ethernet card. Unfortunately the SB 150 stays at the value of 0. It may be a total non-sense, but I think this means devices are not connecting. I have attached a snipet of the code that is supposed to connect them to each other. Is my syntax or/and understanding of the topic correct? Thank you so much for any input! snipet.vlp Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted May 13, 2020 MVP 2023 Report Share Posted May 13, 2020 MB 29 in rung 2 needs to be a direct contact, not a positive transition. That may or may not solve your problem, but start with that. Also, are you connecting the PLC to the I/O through a hub, or a direct cable connection? If the latter, be sure you are using a crossover cable. If using a hub, connect your PC to the hub and make sure you can ping both devices. Thirdly, I notice you are using port 20257 for both the master and the slave. That's okay, but are you sure your slave device is looking for a connection on port 20257? In my experience slave devices of this type usually use port 502. Link to comment Share on other sites More sharing options...
AlexUT Posted May 14, 2020 Report Share Posted May 14, 2020 Delete SB 168 from first net. It is not relevant here. It is better to review MODBUS IP examples in VisiLogic examples directory instead to invent something new. B.R. Link to comment Share on other sites More sharing options...
phlorek Posted May 14, 2020 Author Report Share Posted May 14, 2020 @Flex727 Thank you! Turns out that in fact a change of ports was required for the connection to be made. @AlexUT What about the warning VisiLogic sends if the SB 168 is not included in the project? Is this something I can freely disregard and forget about? B.R. Link to comment Share on other sites More sharing options...
AlexUT Posted May 14, 2020 Report Share Posted May 14, 2020 You used normal open contact SB 168. It not referenced this way in any recommendation. Preferred to use power-up value "set" for SB 168. Set SB 168 warrant you restoring LAN link when LAN cable being disconnected then connected again. Other recommendation is to init all 4 sockets to default settings (explained in Help). B.R. Link to comment Share on other sites More sharing options...
MVP 2023 Ausman Posted May 14, 2020 MVP 2023 Report Share Posted May 14, 2020 @AlexUT , I've often wondered why 168 isn't a Set as default. It really is an odd thing that such a crucial function defaults to not operating, and gets quite a few mentions here. cheers, Aus Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now