Jump to content

Search the Community

Showing results for tags 'serial'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Our Community
    • Come on in!
  • News and Announcements
    • New! UniLogic V1.24 introduces VFDS from Unitronics!!
    • VisiLogic:9.8.64 - Link to mobile app, Ladder: 2x the Space!
    • New!!! ***** U90 Ladder*****
  • UniStream HMI + PLC Programmable Controllers & UniLogic Software
    • UniStream: Hardware
    • UniLogic Software
    • UniLogic UDFBs
    • Industry 4.0, IioT, MQTT--Looking forward
  • Vision, Samba, Jazz and M90 PLC + HMIs & Software
    • Vision & Samba PLC + HMI Controllers & VisiLogic Software
    • Jazz, M91 PLCs and U90Ladder
  • Software Utilities
    • SD Card Suite
    • Remote Operator
    • Remote Access
    • DataXport and DataXls
    • UniDownloader
    • UniOPC
    • UniDDE
  • Utilities for .net and Visual Studio
    • Unitronics PCOM Protocol
    • COM Object ActiveX .dll
    • .NET driver
  • Project Design
    • ...I have a project...what hardware do I need?
  • User Application Stories
    • Just finished a great project?
  • Tips and Tricks
    • Best Programming Practices
    • Tips and Tricks
  • Job Board
    • Projects seeking Programmers
    • Programmers seeking Projects
  • General Discussion
    • We're Listening...
    • The Lounge
  • News and Announcements Copy

Blogs

  • Unitronics' Blog: PLCs, HMIs and more
  • Saragani's Blog
  • Simon's Blog
  • Ash Neilson's Blog
  • Joe Tauser's Blog
  • Unitronics en Español
  • Powered by AMPS
  • Alldrives UK's Blog
  • Unitronics, Howman Style
  • PLCNewbie's Blog
  • Telestar Automation Blog
  • Webinars Collection
  • Tim's Corner
  • Blog
  • TELESTAR (Italian)
  • i4 Automation
  • i4 Automation (UK)
  • Unistream UDFB's

Categories

  • From Headquarters: Sample Applications
    • From Headquarters: VisiLogic
    • From Unitronics: U90 Ladder applications
  • User-submitted Applications
    • From Users: VisiLogic applications
    • From Users: U90 Applications

Categories

  • Articles
    • Forum Integration
    • Frontpage
  • Pages
  • Miscellaneous
    • Databases
    • Templates
    • Media

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 9 results

  1. Hello, Does anyone know of any problems with including both a Modbus Config and a Protocol config for the same COM port in the same program? I'm talking to a peripheral device which under certain circumstances may need to be sent an ASCII Protocol command to switch it to Modbus mode, so I will need to be able to do both types of communication in the same program on the same port. Can the two coexist, or will I need to re-execute the appropriate Config block when switching from one communications mode to the other?
  2. Hi, How many serial connections can I have on a vision series PLC? For example I want to attach a modem on a V130 in order to remotely send commands and at the same time I want to connect an LED screen with an RS232 connection in order for the PLC to send commands and write on the screen.
  3. Hi All - I am working to connect a barcode reader to a Vision 120 PLC via RS232. I have two barcode readers on hand - a Motorola Symbol LS4278 (which reads 1D and 2D codes), and a 1D-only Royal PS700-LSR. Both readers are set up the same way - serial cable with external power input into the scanner, connected to the PLC by a DB9 to RJ45 adapter. When connected to a Serial-to-USB converter to the computer, both scanners send the same data to the Serial Terminal (I am using Hercules). But when connected to the PLC, the Royal scanner data is read as expected, but nothing happens when scanning codes with the Symbol scanner. On the PLC, the Session Complete bit is never set by the Protocol Scan block so none of the other processing is triggered when the Symbol scanner is connected. With the Royal scanner, each scan flips the Session Complete bit, and data is copied and formatted correctly. When the scanners are connected to the computer, I see the exact same hex characters in Hercules from both scanners. PLC program attached. I have tried and confirmed various serial communication settings (baud rate, STX/ETX chars, handshaking, etc.) to match between the scanner and the PLC, and I have worked through the suggestions in this thread: Can anyone suggest what the difference between the two readers might be? I need to make the Symbol reader work since the system will read 2D barcodes. Thanks, Doug Davies 120-barcode-scanner2.vlp
  4. Hey guys, I'm often needing to use advanced modbus features because ill need to have dynamically adddressed slave ID's, or changing registers etc, etc and i cant use the built in configuration to do so. Also - the Advanced modbus still require a good bit of logic to be built in order to achieve a good Tx and Rx. I built this UDFB to be used as a single operation which accepts 4 Function In parameters, and one Function out. Example Ladder Note how the function is called, Param 'D' must be reset immediately after the function call: Ladder Image Input A is a struct with 4 members (Note that only one Arr at a time will be filled with the result data, based on your input to parameter 'B') resultBits[0-50] resultInts[0-50] resultUInts[0-50] resultRaw[0-99] The results of your query are stored here, depending on what value you use for input 'B' 1 = result store in resultsBits 2= result stored in resultInts 3= result stored in resultUints 4= result stored in raw buffer( for parsing floating point values etc, etc) Input 'C' is your input parameters for the MB request - Don't worry about the Modbus request, and request descriptor - these are handled inside the function Input 'C' is a struct with the following members slaveId functionCode = Standard codes...holding register = 3, etc startReg = starting register in slave length = how many registers(Keep in mind length of buffers etc, you can always change this) Retries = how many times to retry read request Timeout = how long to wait for response(5000 = 5 seconds -- 3 retries at 5sec each would be 15 secs for a failed attempt) Input 'D' is the Enable bit for the function to run - make sure to reset this immediately after the function call.(See image above) Output 'A' is a number with the following values 1 = read successful 5 = timeout (timeout * retries) 255 = ladder Error Let me know if i made a glaring mistake, or if you have any improvements! I'm sure i didnt do this as effeciently as possible - but, it does work for my purposes. I may add some more error checking and things later. Let me know what you think! Thanks, Matt MBR.ulle
  5. Hi! How to change Unistream UAC-01RS2 module RS232 serial port communication parameters within ladder function? Connected serial device (Kamstrup Multical M66 type energy meter) use different baudrate for Rx and Tx communication. I need to swap Unistream serial port baudrate between 300 for Rx and 1200 for Tx to get data from energy meter. Also Unilogic serial port configuration allow minimum baudrate only 1200, but there is a need for 300! In Visilogic it is simple, there is a "COM Init" function block for this purpose, that i can use within ladder. How to resolve it within Unilogic ladder??? This is a major problem and need urgent resolving! "This is not possible" is not the right answer!
  6. Hi everybody, Greetings to all, another newbie here... Having some issues on getting Modbus RTU messages to work on JAZZ PLC. My setup: 1) JZ20-R16 PLC with MJ20-PRG adapter (?) plugged in it. I'm using MJ20-CB200 cable (RJ11 plugs on both ends) and MJ10--22-CS10 adaptor (DB9 female connector). Using this gear I can query the PLC with modbus RTU messages over RS232 serial line. Serial line settings I use: 9600bps, 8(data bits), none(parity), 1(stop bits) 2) Gemalto modem (BGS5T) as a modbus master. It has DB9 female connector on it as well. 3) Serial to USB converter cable for serial communication verification. A bit of context: while using serial-to-usb cable I can't query PLC all the time. That means, *sometimes* I can query it successfully, but after disconnecting and messing around a bit I cannot query PLC any more. Unplugging USB-to-serial and reconnecting helps, so I assume it's kinda converter drivers/whatever issues so not a big deal here, just a note. So using this cable I can verify, that PLC *can* (though not always I would expect) respond to Modbus RTU messages properly using defined settings above. I have couple of Modbus master simulation programs and strangely enough only one of them can query the PLC successfully. Real problem: I have written peace of software for BGS5T to act as a modbus tcp/ip to modbus rtu gateway. I can verify that this gateway works by three methods: 1) run modbus slave simulator on a PC, connect gateway over serial line to PC (same usb-to-serial cable used here) and query PC slave simulator over that modem acting as a gateway. Everything's just fine. 2) I can connect to the terminal program on a PC and verify that sent message to serial line is valid modbus RTU message: 0x01 0x03 0x00 0x02 0x00 0x01 0x25 0xCA : (from left to right hexadecimal values) 1) device ID (1 byte) 2) function code (1 byte) 3) start address (2 bytes) 4) register count to read (2 bytes) 5) CRC (MSB) 6) CRC (LSB) 3) I have made "sniffing" rs232 cable and I can listen on messages being set to PLC or being received from PLC (depends on wire I'm hooking to). I can verify that exactly the message defined above is sent to PLC using serial settings mentioned above. PLC does not respond with anything. Absolute silence.... I used 3 wire connections (Tx, Rx, GND), used null-modem configuration for both modem and PLC, nothing helps. JAZZ PLC is silent for those messages. What could be wrong here? Voltage levels does not match..? handshaking is mandatory on JAZZ PLCs..? I'm completelly out of ideas to try out, cannot sleep normally over a week now... I don't know much details about serial line physical implementation, so feel unsure in this topic. Please help. Regards from LTU
  7. Hello, I have a .net application that connects to a 570 via RS-232 using System.IO.Ports.SerialPort. Normally, it will connect. However, when playing with different baud rates, it sometimes does not connect until I connect the same PC with any Unitronics software (Visilogic or Remote Operator). My question is this: With VIsilogic, it appears that you can define the baud rate to anything in the connection properties and it always connects. How does the controller adapt accordingly? I think "out of the box", the rate is set to 115200. If I change my application to 57600, it failes to connect. But, if I connect using Visilogic @ 57600 it works. I go back to my application and then it works. I am trying to determine what Visilogic is doing that I am not. My connection looks like this: // Connect to the PLC try { string comPort = Properties.Settings.Default.CommPort; int comBdRate = Properties.Settings.Default.CommBdRate; int comTimeOut = Properties.Settings.Default.CommTimeOut; _serialPort.PortName = comPort; _serialPort.BaudRate = comBdRate; _serialPort.DataBits = 8; _serialPort.Parity = Parity.None; _serialPort.Handshake = Handshake.None; _serialPort.ReadTimeout = comTimeOut; _serialPort.NewLine = "\r"; _serialPort.Open(); } catch (Exception) { // Disconnect from the PLC _serialPort.Close(); } Once this executes, I begin sending PCOM commands: try { // Send the message out the serial port. _serialPort.DiscardInBuffer(); _serialPort.WriteLine(message); // Verify the message was received, catch the timeout string response = _serialPort.ReadTo("/A00SBF5"); if (response == "/A00SBF5") { //do nothing, success!! } } catch (Exception) { _connectionLost = true; _serialPort.Close(); return -1; } The _serialPort.ReadTo() catches the timeout (default 1 sec). When that occurs, we assume we lost the connection. Is there something I should be doing to prime the port first? Thanks!
  8. Version Document

    698 downloads

    Use to troubleshoot communication between PC and PLC
  9. Hi, I'm having trouble downloading my application to a new and clean V350-35-R34, it fails over both serial and ethernet. Loading Bin. Lib, Boot, OS and Sync RTC works fine. My UDC file contains the following, and I'm trying to execute using UniDownloader v. 4.1.02: Bin.Lib v. 2.1 (02) BOOT v. 2.1 (06) OS v. 3.0 (67) Sync. RTC Application As said, I'm able to download Bin.Lib, Boot and OS. I then do Sync RTC fine, but when trying to only execute the application item to the PLC it says Application failed. This happens during: Status: Downloading String Lib to PLC. The UDC file is 628kb big. This is creating big problems for me at the moment, as I need to be able to distribute this UDC with the new application to a lot of customers..on both old and new PLC's (upgrade/reinstall of application) Any ideas?
×
×
  • Create New...