Rodney Posted August 21, 2017 Share Posted August 21, 2017 Hi Newbie here so apologies for this simple Port Locked issue I have simple 4 channel Relay which I am testing by toggling on and off each relay then displaying its status and displaying a valve component etc If i turn off the 4 input channels by setting timing to 0 I can rapidly toggle the 4 relay buttons with no errors If I set the timing to 1 for the 1st relay and rapidly toggle the relays I get spasmodic port locked errors I think I have identified where the issue is - at 20:13:08.014 the output Channel tries to write in between the input TX at 20:13:08.001 and the RX at 20:13:08.049 Which Channel parameters do I need to change to fix this? I have been reading both the forum and help and I am now very confused as to what I need to do Regards Rodney Port_Locked.txt Link to comment Share on other sites More sharing options...
Rodney Posted August 21, 2017 Author Share Posted August 21, 2017 Sorry I forgot to say that I am using a RS485 TCP converter for the comms Rodney Link to comment Share on other sites More sharing options...
AzeoTech Posted August 21, 2017 Share Posted August 21, 2017 What is your baud rate, and what is the Timeout value set for the port? Link to comment Share on other sites More sharing options...
Rodney Posted August 21, 2017 Author Share Posted August 21, 2017 Baud rate 9600 - needs to be this low as I have a number of different types of equipment for the project and for some this is the max so I have set all to 9600 to make it easier for me Timeout is set to 685ms - I set this after trial and error to get the lowest without timeout errors on any of the comms with all different type of equipment Link to comment Share on other sites More sharing options...
AzeoTech Posted August 21, 2017 Share Posted August 21, 2017 Fire up the comm monitor and check the box labelled "display time of tx/rx". Then look at the time difference between Tx and Rx to determine what the reply rate is the device. Its possible that the device is quite slow and that's using up your timeout, not leaving space for an output. Link to comment Share on other sites More sharing options...
Rodney Posted August 21, 2017 Author Share Posted August 21, 2017 I think I have done this - see the txt I file I sent Link to comment Share on other sites More sharing options...
AzeoTech Posted August 29, 2017 Share Posted August 29, 2017 You probably need to raise the timeout. There usually is no reason to try and set it super low. If its set just high enough not to get timeouts from reading, you aren't going to have any headroom for anything else. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.