Jump to content

MisterB.Ohio

Members
  • Posts

    14
  • Joined

  • Last visited

Everything posted by MisterB.Ohio

  1. Joe, thank you for the suggestion of Bray's terminal. Using this I was able to capture the attached. it shows 8 packets received from the Axetris TDL. Each begins with hex 7B 4D ( {M ) and ends with 7D ( } ). I did as you asked and changed the Scan to not look for a start of text or end of text. I put a 25 word (50byte) string in and set the terminator to 10 mS silence and tried that. In INFO mode I can see that the full messages are received once a second as I expected. However the program itself is not recognizing them as valid since it is looking for 50 bytes. so shortening this to 24 bytes the messages are saved in the MI's. I then put the opening bracket back as the STX, but coded the M in the first position of the message and shortened the string to 22 bytes. this also worked. I then changed the variable to save one byte per MI and made the vector length 22. This worked. When I made the vector length 21 and put the closing bracket as the ETX it stopped working. but if I code the end bracket as a control character at the end of the message line, and put the 10 mS silence back, it works. SO I do have a work around, but any clue as to why the ETX method is not working? Thanks for your help.
  2. The actual device that data is being read from is an Axetris TDL. I increased the time out to 1.5 seconds and it had no effect. I get the same results. I installed a positive transition on the 1 second square wave (SB3) in the protocol scan line. No effect, same results. What functions would I use to allow the PLC to 'just receive the stream'? If you mean setting the scan to have a 24 bit string? yes I have and it makes no difference. Does the Protocol function block change the serial buffer size? how can the serial buffer size be set? Thanks for any suggestions and help.
  3. OK... I have started a fresh program to eliminate the rest of my programming from the equasion. Here is the entire program, the serial port init, and the protocol scan setup. An example of the hex message I am receiving is: 7B 4D 18 00 00 00 05 71 47 42 03 BC 4D 46 E0 AB F4 41 00 00 00 00 0F 7D When this program is loaded into the V700 and run, it does not receive any valid messages from the Instrument. If, using a laptop, I send "{Mabcdefghijklmnopqrstu}" the program says it receives message 1 from the computer. If I go into INFO mode while running the program, the serial monitor function will show the complete message received from the laptop. If I reconnect the instrument, it shows only the last 16 bytes received. One note - the instrument sends these packets out once a second. The confusing part to me is when I delete this program from the V700 and install a program that does not configure COM2. In INFO mode it shows Com2 to be configured for PCOM protocol instead of "Protocol". With that and looking at the serial monitor it shows that the V700 is receiving the proper packets from the instrument. All 24 bytes are displayed. HELP please? any more information needed? Serial trial.vlp
  4. Just to add more information, I have verified that when the V700 is not running the program I wrote, while in INFO mode, the serial port monitor does show the complete message received from the instrument. This is the snipet from my ladder. Does there need to be a delay?
  5. I have written software to receive data from an RS232 instrument using Port 2 (V100-17-RS4 properly configured) The issue is it does not receive a valid data packet. I have gone into INFO mode on the V700 and am able to verify that port 2 is configured for RS232 and can see monitor the received data. The packets are all missing the first 3-6 bytes of data. I have verified with a laptop plugged into the same cable that the entire packet is arriving at that point. Is there something obvious I am missing ? does there need to be a delay in the PLC software? Why would it drop the first several bytes? Oh and the data rate is not extremely high - 9600, 8, n, 1, no parity, no flow control. Thanks for any insight.
  6. Figured out how to receive the values. I have to save each of the values as a 4 byte string of fixed length. I just need to define each of the possible replies from the instrument and I'll be done. HOWEVER, the check sum had to be added as a variable. I'll have to still figure that out. The instrument calculates it by adding the values of each byte sent, taking the LSB and sending the 2's compliment of this. It does not add in the checksum itself or the closing '}'. DO I need to set the "offset till (backwards)"?
  7. Ausman, as the topic says, the instrument is connected through an RS232 cable to the PLC. I have the port2 of the V700 initialized and it is configured. Using the protocol scan to receive data, you can receive all types of ASCII data. My question is how can you receive binary data. IE when the instrument (an axetris TDL) sends a stream of bits (or hex) how can the value of those be saved into an MI? the data stream for a valid response contains 16 bytes from the instrument. an example is: 7B 4D 10 00 00 00 28 54 EE 45 00 00 00 00 79 7D The first 2 bytes are "{M" meaning a measurement value response. The next 2 bytes are the total number of bytes transmitted, in this case 16. The next two bytes are an error code. in this case 0 meaning no error. The next 4 bytes are the actual data. It is sent as an IEEE 754 floating point number. I can convert that but need to be able to store the 4 bytes as 2-16 bit integers. in this case 10324, and 60997. The next 4 bytes are filler to make the package a multiple of 8 bytes long. The next byte (79) is a 2's compliment check sum. The final byte (7D) is the end of packet, "}". Maybe the way to read this is not using the PROTOCOL SCAN function block. If not how should I do this? Also the instrument sends various responses, varying in length and information that is sent. However if I can read this one I should be able to adapt to read the others. Thank you for any help or suggestions offered. Bill
  8. I am trying to receive data from an instrument. The data stream is a series of binary numbers. The help file for the Protocol FB says that it can receive a variable as a binary number. However, in practice this does not seem to be the case. Can a V700 PLC receive a binary number and save it into an MI ? again using the protocol scan function I do not see how this is possible. Thanks for any help with this. Bill
  9. I have an application where I need to allow a Modbus Master to set the real time clock of the PLC. That way any scheduled cycles take place synchronized with the rest of the plant. Is this possible and if so what would be the process for doing so? any examples available?
  10. 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?....
  11. 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"?
  12. Thank You. figured it out... by triggering the counter at the specified time of day, it will start when desired.
  13. This will work if it was just a number of days. But the calibration needs to start at a specific time.
  14. I have an application where the unit needs to go through a calibration cycle every so often. This interval will be specified as a number of days between calibrations and a time of day for it to take place. There is also a screen where the calibration can be triggered manually (or through modbus). I am using a V430 PLC programmed through Visilogic. The timers only go to 100 hours, if the task is scheduled for every 15 or 20 or 30 days, what signal can I use to trigger a count down timer once a day? I can set up a decrementing counter for the number of days and trigger the calibration cycle and reset the "# of days counter." But how do I trigger it?
×
×
  • Create New...