itayh Posted November 23, 2021 Report Share Posted November 23, 2021 Hey all, I'm new programmer in visilogic IDE and my device is v130-33-TA24. My program purpose is to communicate via RS485, 9 bits to receive data from device. I initialized COM1 and set protocol Send&Scan by the connected device protocol. but nothing is show on screen(I've linked the received data into number on screen). I add some pictures for description. I'll be glad for help Quote Link to comment Share on other sites More sharing options...
MVP 2022 kratmel Posted November 23, 2021 MVP 2022 Report Share Posted November 23, 2021 Moved ... If you need to program Protocol message - best way to use Ethernet or second RS232 Port 2 for connection to Visilogic. You can use SEND ans SCAN sequence from Visilogic Sample program. Some tips about Protocol present on forum topics. 1 Quote Link to comment Share on other sites More sharing options...
MVP 2022 Ausman Posted November 23, 2021 MVP 2022 Report Share Posted November 23, 2021 Also please explain rung 2 some more. If you're receiving data, why is there a send? Which is likely upsetting the scan as well. FYI, for anything like this, I always perfect what I need to do using the PC first. Once that is working perfectly, you can then transpose things into the PLC much, much easier. cheers, Aus 1 Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted November 23, 2021 MVP 2022 Report Share Posted November 23, 2021 Also, I'm not sure MB 1 is necessary (all the configuration and initialization will take place immediately before the program executes the next rung). What you might need is for SB 41 to SET a bit and use that bit (direct contact) to initiate your communication, with a RESET of the bit at the end. 1 Quote Link to comment Share on other sites More sharing options...
Gabriel Franco Posted November 24, 2021 Report Share Posted November 24, 2021 PROTOCOL SCAN block must be running in a different way. I use Function In Progress as a condition to SCAN block. Quote Link to comment Share on other sites More sharing options...
MVP 2022 Flex727 Posted November 24, 2021 MVP 2022 Report Share Posted November 24, 2021 12 hours ago, Gabriel Franco said: I use Function In Progress as a condition to SCAN block. That is correct. Use SB 41 to SET a bit. Then use a Direct Contact of that bit, followed by an Inverted Contact of the Function in Progress bit, then your communications, then a RESET of the first bit, similar to below: Quote Link to comment Share on other sites More sharing options...
itayh Posted November 30, 2021 Author Report Share Posted November 30, 2021 Hey all, thanks for your replies. I succeed to check the message transmission by rs485 9 bits(Some string). But I wonder if anyone can explain me how to send, by specifically protocol commands a 9 bit of data. For example, I have an 11 bit of payload: 0, 10 -for STA and STO. The ninth else for data and another bit for address. How can I, via protocol FB, send that? Every single cube in the protocol message is a regularly 8bit-1byte? Even though I changed it to 9 bit at the com init? Thank you all, Itay. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.