MisterB.Ohio Posted February 13, 2019 Report Share Posted February 13, 2019 I am developing an instrument that will serve its data on an RS485 ModBus network. I am using a V700 Vision controller, programmed using Visilogic. The end user should be able to set the communication parameters for that network. In order to do this I would like to have a screen display the options for Baud Rate, Data Bits, Stop Bits, Parity, Instrument ID(address on 485 net). The user should be able to set these parameters and then press a button and have the com port initialize using these parameters. I have not been able to figure out how to do this. Am I missing some key information in the manual? I have done this with an ethernet connection previously... Modbus over IP. I have a screen where the IP address, network mask, gateway and Port number are all entered then the connection is reconfigured/reinitialized when the button is pressed with the new information. Is this possible with the RS 485 "Com init"? Link to comment Share on other sites More sharing options...
MVP 2023 Ausman Posted February 13, 2019 MVP 2023 Report Share Posted February 13, 2019 My understanding of this is that what you want to do is not possible, but I might be wrong. Your modbus over IP can be altered because of the totally different way the info exchange is done. With a 232/485 serial stream, the hardware has to know exactly how it is meant to be working, whereas resetting an IP port is essentially using the same settings with different names. It got me thinking as to whether the power up bit setting the com port could have a user set direct contact in front of it that is then linked to a setup screen. You have all the variations in the com init settings that you might encounter linked to a particular contact that is chosen using a screen after first powerup, and this then controls the associated com init on next powerup. But there's also the modbus config block that only works with constants, so you are getting into serious "multi-possible-configurations" here. I'm happy to be howled down on this one, have never had to do it as I always use 9600, 8, none, 1 and adjust other things on the network to suit if needed. I have had comms issues with other settings. cheers, Aus Link to comment Share on other sites More sharing options...
MVP 2023 Flex727 Posted February 13, 2019 MVP 2023 Report Share Posted February 13, 2019 I think Ausman is correct here. You could set up multiple pre-set configurations for the user to select and have the selected configuration initialized by ladder. I haven't tried that, but it should work. Link to comment Share on other sites More sharing options...
MVP 2023 kratmel Posted February 13, 2019 MVP 2023 Report Share Posted February 13, 2019 I have not tried and yet do not know if it is possible to use the built-in com port without initialization in the program. Perhaps this will work using the settings that are available in the info Mode window of the panel itself.There are all settings present in info Mode for all ports. Modbus must configured by 26 minutes ago, Flex727 said: set up multiple pre-set Is it solution Flex727, Ausman? What do you think about this? Link to comment Share on other sites More sharing options...
MisterB.Ohio Posted February 13, 2019 Author Report Share Posted February 13, 2019 Ausman and Flex727 thank you for the replies. I was hoping the answer was that the parameters were saved in a system register that could be altered and then the port could be reinitialized. Having a couple of baud rate options (preset) as a minimum to choose from could work. The network ID is already configurable through the modbus init....... one other question... can the com port be initialized if it has already been initialized? ie if I set it to 9600 as a default but the end user wants to set it to 19200 can the comport init and modbus init be recalled with out error?.... Link to comment Share on other sites More sharing options...
MVP 2023 Ausman Posted February 13, 2019 MVP 2023 Report Share Posted February 13, 2019 1 hour ago, kratmel said: Is it solution Flex727, Ausman? The builtin always defaults to certain parameters. You can change them via info, but on any reboot such settings would be lost. That is the problem. And the only way I can see of getting around it is the "presets selected by a bit that controls the relevant power up bit" method. Also, if doing this, you would have to have all the "controlling" bits interlinked so that only one could be active. 1 hour ago, MisterB.Ohio said: The network ID is already configurable through the modbus init. Yes, it is, but again only at power up, as it only uses direct addressing. So it needs to be in your list as well...that's why I was saying it is a big preset list! Again, happy to be proven wrong, but keep in mind it is a totally different kettle of fish to the IP method. cheers, Aus Link to comment Share on other sites More sharing options...
MVP 2023 kratmel Posted February 14, 2019 MVP 2023 Report Share Posted February 14, 2019 1 hour ago, Ausman said: any reboot such settings would be lost I tried to change the settings through the info Mode in the V1040 panel (com2 for example 57600>to>9600, RS232>to>RS485).After confirming settings, i tried to restart the panel - the settings remained unchanged (9600, RS485 - new setting is active). The question remains: is it possible to use com port in OPLC without COM init block in the program? Visilogic Help say - COM init needed for communication. Com init block change default com settings (preset in info Mode) to user defined. Maybe If changes not needed this block is optional. I will try to do some experimenting to answer this question Link to comment Share on other sites More sharing options...
MVP 2023 Ausman Posted February 14, 2019 MVP 2023 Report Share Posted February 14, 2019 50 minutes ago, kratmel said: the settings remained unchanged Well...that is not what I remembered happening, so maybe I am mistaken in my belief that it doesn't stick! Was it a full power off for a few seconds and power on? If it was, maybe the bigger Visions do this...I have only ever used smaller ones like 130s. If it does stick, I can't see why it won't work. Pls do experiment, kratmel! I haven't got time today to do so.....will try another day. cheers, Aus Link to comment Share on other sites More sharing options...
MVP 2023 Joe Tauser Posted February 16, 2019 MVP 2023 Report Share Posted February 16, 2019 On 2/13/2019 at 6:10 PM, kratmel said: is it possible to use com port in OPLC without COM init block in the program? No. Without COM INIT block the system keeps the serial port all to itself. However, you can re-init the COM block from logic: This is really useful for the Ethernet port, which allows specification of IP addresses via MIs. It doesn't really help for the serial port- The only reason to re-init the block is if you make COM changes and download them without cycling PLC power. Sorry. Joe T. 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