Tumgik
readydaq-blog · 7 years
Text
About I²C
Tumblr media
  I²C is a multi-master protocol that uses two signal lines. The two I²C signals are named ‘serial data’ (SDA) and ‘serial clock’ (SCL). There is no need of chip select (servant select) or compromise logic. Basically, any number of servants and any number of masters can be united onto these two signal lines and correspond to each other using a protocol that specifies:
• 7-bits servant addresses: every device united to the bus has got such a unique address;
• certain control bits for governing the communication commence, end, and direct for any acknowledgement mechanism.
• data are divided into 8-bit bytes
The data standard must be chosen betwixt 100 kbps, 400 kbps and 3.4 Mbps, accordingly called standard mode, a fast mode and high-speed mode. Some I²C variations contain 10 kbps and 1 Mbps as genuine speeds. Physically, the I²C bus comprises the two active wires SDA and SCL and a ground connection. The effective wires are both bi-directional. The I2C protocol necessity states that the IC that begins a data transfer on the bus is treated the Bus Master. Therefore, at the time, all the other ICs were considered to be Bus Servants.
At electrical rank, there is literally no conflict at all if multiple instruments try to put any logic rank on the I²C bus lines together. If one of the drivers attempts to write a logical zero and the other a logical one, then the open-drain and pull-up arrangement ensure that there will be no shortcut and the bus will indeed see a logical zero transiting on the bus. In other words, in any conflict, a logic zero always ‘scores’.
Furthermore, the I²C protocol likewise helps at dealing with communication problems. Any apparatus present on the I²C listens to it permanently. Promising masters on the I²C encountering a START condition will wait until a STOP is encountered to attempt a new bus admission. Servants on the I²C bus will decode the device address that follows the START condition and checks if it doubles theirs. All the servants that are not addressed will wait until a STOP status is issued before listening repeatedly to the bus. Likewise, since the I²C protocol foresees active-low acknowledge bit after each byte, the master/servant couple can identify their counterpart presence. Ultimately, if anything else goes bad, this would signify that the apparatus ‘talking on the bus’ would know it by simply comparing what it sends with what is seen on the bus. If a difference is detected, a STOP case must be issued, which discharges the bus.
0 notes
readydaq-blog · 7 years
Text
I²C vs SPI - comparison
Tumblr media
Bus topology / routing / resources
I²C needs two lines, while SPI officially defines at least four signals or more if more servants are added. Some informal SPI alternatives only need three wires, that is an SCLK, SS and a bi-directional MISO/MOSI line. Nevertheless, this exercise would require one SS line per servant. SPI lacks further work, logic and/or pins if a multi-master engineering must be built on SPI. The singular problem I²C when building a system is a finite machine address space on 7 bits, overwhelmed with the 10-bits enlargement. From this point of view, I²C is a clear winner over SPI in sparing pins, board routing and how effortless it is to build an I²C network.
Throughput / Speed
If data must be relocated at ‘high speed’, SPI is apparently the protocol of choice, over I²C. SPI is full-duplex, and I²C is not. SPI does not determine any speed limit. Exercise often go over 10 Mbps. I²C is limited to 1Mbps in Fast Mode+ and to 3.4 Mbps in High-Speed Mode. This last one requires particular I/O buffers, not regularly easily available.
Elegance
It is usually said that I²C is much more elegant than SPI and that this last one is a very ‘rough’ protocol. People tend to think the two codes are equally elegant and comparable on robustness. I²C is elegant for it offers very advanced appearances, such as automatic multi-master clashes handling and built-in addressing management, on a very light foundation. It can be very complex, nonetheless and somewhat lacks performance. SPI, on the other hand, is quite easy to comprehend and to implement and offers a great deal of flexibility for extensions and alternatives. The disparity is where the elegance of SPI lies. SPI should be considered as a good platform for building custom protocol piles for transmission between ICs. Thus, in accordance with to the engineer’s need, using SPI may need more work but offers raised data transfer performance and almost total freedom. Both SPI and I2C offer favourable support for connection with low-speed machines, but SPI is improved suited to applications in which devices assign data streams, while I²C is improved at multi master ‘register access’ application.
0 notes
readydaq-blog · 7 years
Text
Basics and Applications of Optical Sensor
Tumblr media
An optical sensor is one that converts light rays into a computerized signal. To measure a physical quantity of light and, depending on the sort of sensor, translate it into a form that is readable by some unified measuring device is the purpose of an optical sensor. Optical sensors can be both external and internal. External sensors assemble and address an appropriate quantity of light, while internal sensors measure the bends and other small changes in direction.
Types of Optical Sensors
There are various kinds of optical sensors, and here are the most common types.
Through-Beam Sensors The usual system consists of two independent components. The receiver and the transmitter are placed opposite to each other. That transmitter projects a light beam onto the receiver. A breach of the light beam is explained as a switch signal by the receiver. It is insignificant where the interruption appears.
Its advantage is that large operating distances can be attained and the recognition is separated from the object’s surface structure, colour or reflectivity.
It must be assured that the object is sufficiently huge to interrupt the light beam completely, to ensure a high operational dependability.
Diffuse Reflection Sensors Both receiver and transmitter are in one housing. The transmitted light is reflected by the object that must be identified.
The diffused light intensity at the receiver serves as the switching condition. Regardless of the sensitivity setting the front part regularly reflects worse than the rear part and this leads to the after effect of false switching operations.
Retro-Reflective Sensors Here, both transmitter and receiver are in the same house. Through a reflector, the radiated light beam is conducted back to the receiver. An interruption of the light beam commences a switching operation. It is not influential where the interruption occurs.
Retro-reflective sensors set up large operating distances with switching points, which are completely reproducible demanding little escalating effort. Any object interfering the light beam is precisely detected independently of its colour or surface structure.
0 notes
readydaq-blog · 7 years
Text
How Stack Machines Meet the Needs of Various Systems
Tumblr media
There are various characteristics which need to be met in order for these machines to be suitable and to be fully and successfully implemented into real time systems. These characteristics are as follows: size and weight, power and cooling, operating environment, cost and performance.
Size and Weight
It has been observed that stack computers are very simple in regards to processor complexity. However, it is the overall system complexity that determines overall system size and weight. The solution to overcoming the size and weight issue is to keep component count small. That is why stack machines are less complex than other machines and are also more reliable.
Power and Cooling
If the processor is complex, it can affect the amount of power it needs. That amount of power is related to how many transistors there are in a processor and how many pins are on the processor chip. Moreover, processors that need a lot of power-consuming high-speed memory devices can also be burdensome regarding power. Of course, power consumption directly affects cooling requirements, since all power used by a computer is eventually transmuted into heat. The cooler operation of processor components can reduce the number of component failures, thus improving reliability.
Operating Environment
Embedded processing systems are well known for extreme operating conditions. The processing system must deal with heat and cold, vibration, shock, and even radiation. Also, in remotely installed applications, the system must be able to survive without field service technicians to make repairs. The general rule to avoiding problems caused by operating environments is to keep the component count and a number of pins minuscule. Stack machines, with their low system complexity and high levels of integration, do well under these conditions.
Cost
Since the cost of a chip is related to the number of transistors and to the number of pins on the chip, low complexity stack processors are basically low in cost.
Computing Performance. Computing performance in a real time embedded control environment is not simply defined. Although raw computational performance is important, there are other factors which influence the system. An additional desirable feat is a fantastic execution in programs that are filled with procedure calls reducing program memory size.
0 notes
readydaq-blog · 7 years
Photo
Tumblr media
RS-232 (ANSI/EIA-232 Standard) is the most widespread serial interface and it is used to ship as a standard component on most Windows-compatible desktop computers. Nowadays, it is more frequent to use RS-232 rather than using a USB and a converter. One downfall is that RS-232 only permits for one transmitter and one receiver on each line. RS- 232 also employs a Full-Duplex transmission method. Some RS-232 boards sold by National Instruments support baud rates up to 1 Mbit/s, but most devices are restricted to 115.2 kbit/s. On one hand, RS-422 (EIA RS-422- A Standard) is the serial connection employed primarily on Apple computers. It provides a mechanism for sending and receiving data up to 10 Mbits/s. RS-422 sends each signal employing two wires in order to increase the maximum baud rate and cable length. RS-422 is also specified for multi-drop applications where only one transmitter is linked to and sends and receives a bus of up to 10 receivers. On the other hand, RS-485 is a superset of RS-422 and expands on the capabilities of that previous model. RS-485 was manufactured to deal with the multi-drop limitation of RS-422, letting up to 32 devices to communicate through the same data line. Any of the subordinate devices on an RS-485 bus can communicate with any other 32 subordinate or ‘slave’ devices without the master device receiving any signals. Since RS-422 is a subset of RS-485, all RS-422 devices can be controlled by RS-485. Finally, both RS-485 and RS-422 have multi-drop capability installed in them, but RS-485 allows up to 32 devices and RS-422 has a limit of only 10 devices. For both communication protocols, it is advisable that one should provide their own termination. All National Instruments RS-485 boards will work with RS-422 standards
0 notes
readydaq-blog · 7 years
Text
Setting up LabVIEW Project
Tumblr media
      Complete the following steps to set up the LabVIEW project:
Launch LabVIEW by selecting Start»All Programs»National Instruments»LabVIEW.
Click the Empty Project link in the Getting Started window to display the Project Explorer window. You can also select File»New Project to display the Project Explorer window.
Select Help and make sure that Show Context Help is checked. You can refer to the context help throughout this process for information about items in the Project Explorer window and in your VIs.
Right-click the top-level Project item in the Project Explorer window and select New»Targets and Devices from the shortcut menu to display the Add Targets and Devices dialog box.
Make sure that the Existing target or device radio button is selected.
Expand Real-Time CompactRIO.
Select the CompactRIO controller to add to the project and click OK.
Select FPGA Interface from the Select Programming Mode dialog box to put the system into FPGA Interface programming mode.
Tip Tip  Use the CompactRIO Chassis Properties dialog box to change the programming mode in an existing project. Right-click the CompactRIO chassis in the Project Explorer window and select Properties from the shortcut menu to display this dialog box.
Click Discover in the Discover C Series Modules? dialog box if it appears.
Click Continue.
Drag and drop the C Series module(s) that will run in Scan Interface mode under the chassis item. Leave any modules you plan to write FPGA code for under the FPGA target.
0 notes
readydaq-blog · 7 years
Text
Real-Time Processor
Tumblr media
An industrial 400 MHz Freescale MPC5200 processor that deterministically acquires one’s LabVIEW Real-Time applications on the reliable Wind River VxWorks real-time operating system features the CompactRIO installed the system. Built-in operations for transferring data between the real-time processor within the CompactRIO embedded system and the FPGA are available in LabVIEW. One can pick from more than 600 built-in LabVIEW functions to frame its multithreaded installed system for real-time analysis, control, data logging, and communication. To save on development time, one can likewise combine existing C/C++ code with LabVIEW Real-Time code.
Starting a New CompactRIO Project in LabVIEW
One should commence by creating a new project in LabVIEW, where one can manage some hardware resources and code.
1.By selecting File » New Project, one creates a new project in LabVIEW.
2.Right-click on the Project feature at the top of the tree and by selecting New » Targets and Devices, one adds existing CompactRIO system to the project.
3.One can add offline systems, or discover, by this dialogue, systems on existing network. To enlarge the Real-Time CompactRIO folder, select existing system, and click OK. Note: LabVIEW might not find it on the network if the existing system is not listed. Ensure that the existing system is well configured with a valid IP address in Measurement & Automation Explorer. One can likewise select to manually enter the IP address if the existing system is on a remote subnet.
Select the Appropriate Programming Model
Two programming models are granted by LabVIEW for CompactRIO systems. If one has LabVIEW FPGA and LabVIEW Real-Time on the existing development CPU, the one can be incited to pick which programming model he/she would like to use. In the LabVIEW Project, the one can change this setting later, if needed.
Scan Interface (CompactRIO Scan Mode) option allows a person to programme the real-time processor of the already existing CompactRIO system on a computer, but not the FPGA. NI provides a pre-defined personality for the FPGA that regularly scans the I/O and allocates it in a memory map, in this mode, making it accessible to LabVIEW Real-Time. For applications that lack single-point access to I/O at rates of a few hundred hertz, CompactRIO Scan Mode is sufficient. If someone wants to learn more about scan mode, the one should read the “Using CompactRIO Scan Mode” with “NI LabVIEW” white paper and sight the benchmarks.
LabVIEW FPGA Interface option allows a person to unlock the true power of CompactRIO throughout customising the FPGA personality in addition to the programming of the real-time processor and accomplishing performance that would typically lack custom hardware. One can implement custom triggering and timing, off-load signal analysis and processing, create custom protocols, and access I/O at its maximum rate by using LabVIEW FPGA.
After that, one should select the appropriate programming model for the existing application.
Consequently, LabVIEW will then try to detect C Series I/O modules present in the existing system and automatically add them to the LabVIEW Project and the chassis. Note: If a person’s existing system was not discovered and one chooses to add it offline, one will need to add the chassis and C Series I/O manually. For scan mode and FPGA mode, The LabVIEW Help online discusses this operation.
0 notes
readydaq-blog · 7 years
Text
CompactRIO Scan Mode Tutorial
Tumblr media
This section will teach a person how to create a basic control application on CompactRIO using scan mode. One should see the LabVIEW FPGA Tutorial if the choice is to use the LabVIEW FPGA Interface. One should then have a new LabVIEW Project that consists of the existing CompactRIO system, including the controller, C Series I/O modules, and chassis. An NI 9211 Thermocouple input module will be used in this tutorial; nonetheless, for any analogue input module, the process can be followed.
1. The project is saved by selecting File»Save and entering Basic control with scan mode. Click OK.
2.This project will only consist of one VI, which is the LabVIEW Real-Time application that runs installed on the CompactRIO controller. Right-clicking on the CompactRIO real-time controller in the project and selecting New»VI saves the VI as RT.vi.This one is created by the VI.
3.Three routines are included in the key operation of this application: start up, run, and shutdown. An effortless way to accomplish this order of operation is a flat sequence structure. Place with three frames on the existing RT.vi block diagram a flat sequence structure.
4.Then, a timed loop to the Run frame of the sequence structure should be inserted. The capability to synchronise code to various time basis, including the NI Scan Engine that reads and writes scan mode I/O is provided by timed loops. 5. If the timed loop is to be configured, one should double-click on the clock icon on the left input node.
6. Now, select Synchronise to Scan Engine as the Loop Timing Source. Click OK. This will cause the code in the timed loop to execute once, instantly after each I/O scan, assuring that any I/O values used in this timed loop are the most recent ones.
7. To run synchronised to the scan engine, the step before constructed the timed loop. Now, by right-clicking on the CompactRIO real-time controller in the LabVIEW Project and picking Properties, one should configure the rate of the scan engine itself.
8.Then, choose Scan Engine from the categories on the left and enter 100ms as the Scan Period and all the I/O in the CompactRIO system to be updated every 100ms (10Hz). From this page, the Network Publishing Period can also be set, which regulates how often the I/O values are published to the network for remote monitoring and debugging. After that, click OK.
9. Now that one has constructed the I/O scan rate, it is time to add the I/O reads to the existing application for control. One can simply drag and drop the I/O variables from the LabVIEW Project to the RT block diagram when using CompactRIO Scan Mode. Expand the CompactRIO real-time controller, chassis, and the I/O module the one would like to log. By clicking on it, select AI0, then drag and drop it into the timed loop on your RT.vi diagram.
10.Now, in this project for speciality digital Pulse Width Modulated output, one should configure the digital module so the one can use a PWM signal to control the imaginary heater unit. Right click on the existing digital module in the project and select Properties, to do this. Select Specialty Digital Configuration and a Speciality Mode of Pulse-Width Modulation in the C Series Module Properties dialogue. Speciality Digital mode allows the existing module to perform to pattern based digital I/O at rates significantly faster than is available with the scan interface. Click OK and the existing module will now be in PWM mode.
11.Then a person is ready to add the actual PWM output to the block diagram. To do so, widen the Mod2 object in the project and drag and drop the PWM0 item to the block diagram as it has been done with the AI0 I/O node in the previous step.
12.After that, somebody will want to join the PID control logic to this program. Right click the block diagram to open the functions palette and click on the Search button in the top right of the palette, if one wants to do such a thing.
13.Scan for PID and pick PID.vi in the Control Design and Simulation Palette and drag it to the actual block diagram of the timed loop and wire the PID VI. 14.The set point input is not wired now. That is because it is best practice to keep user interface (UI) objects out of actual high priority control loop. If someone wants to interact with and adjust the actual set point at the run time, the one will want to create a control that can be interacted with in the lower priority loop. Also, if someone wants to create single process shared variables for I/O in the already existing high priority control loop, two controls in our application (set point and stop) are needed to create two new single process shared variables. A single process is created and the variable is shared by right click on the actual RT CompactRIO Target in the LabVIEW Project and New >> Library should be selected. Rename the library into something perceptive like RTComm. Then, one should right click on the new library and select New>>Variable. That will open the Shared Variable Properties dialogue. The variable should be named SetPoint (for example, the name depends on person’s imagination) and “Single Process” should be selected for the variable type in the Variable Type drop down box. Finally, click on the RT FIFO option in the left-hand tree and click the Enable RT FIFO check box.
15. In the library that has just been created, another single-process shared variable should be made. This variable is for the Stop control that is going to be created that will stop the program when it is needed. All the same settings as the previous Set Point variable except for the type this new variable should possess, and it should be Boolean.
16.Next, some user interface should be created. Such a thing is done in Slide control, Waveform Chart, Numeric control, and Stop (Boolean) control.
17.This program is supposed to be finished now by creating a secondary (non-timed) loop for the actual UI objects and finishing wiring the existing block diagram.
18.Note the extension of I/O to the configuration and shutdown states to ensure that already existing I/O is in a known state when the program begins and ends. The basic control application should be ready to run.
0 notes
readydaq-blog · 7 years
Text
Embedded Controller for Data Acquisition
Tumblr media
Embedded control is a subgroup of the overall data acquisition and control market. The I/O system is not connected to an external PC. The processor runs the system or the PC, which is incorporated into the I/O chassis itself, is the differentiating feature of an embedded system. One hosted DAQ system is usually introduced by some type of general purpose PC with a keyboard, monitor or some other human interface apparatus. However, an Embedded Control system's processor is normally designed specifically to control and monitor the system and often does not provide the direct connection to a monitor or any other human interface at all. Still, the hardware differences between a standard PC and an embedded controller are evident. The differences in software are usually significant as well. Large operating systems (in terms of memory and disk space requirements) such as MAC OS X and Windows XP are the ones most PCs are based on, while the typical embedded system is more likely to be based on a smaller operating system developed to provide a simple and powerful GUI human interface. Nowadays, people are much more likely to work on operating systems such as Windows CE or Linux. Further, as many of these systems are in control of high speed or timing critical operations, people are much more likely to work on an embedded control DAQ system based on a real-time operating system such as RTX, QNX or Linux. There is almost always some link to the outside world, even though the embedded control CPU is quite likely to run individually on any supervisory controller. Generally, it can be as complex as letting the supervisory computer take entire control any time the communication’s link between the two systems is active, but this may also be as limited as providing a simple "OK" or "not OK" situation. Usually, it is somewhere in between the supervisory control and data acquisition (SCADA) where computer looks over system status and provides a link that allows a human operator to manage the system's operation, or gives some direction (e.g. set points or PID control loop adjustments). It is important to indicate that the heart of an industrial control system or a process control application is often some embedded controller. It should be at the center of a remote controller (that allows an application to keep running even if its significant link to the outside world is cut) or portable data acquisition system.
0 notes
readydaq-blog · 7 years
Text
WHAT IS RS422?
Tumblr media
0 notes
readydaq-blog · 7 years
Text
APPLICATIONS OF RS-485
Tumblr media
RS-485 signals are used in a wide range of computer and automation systems. In a computer system, SCSI-2 and SCSI-3 may use this specification to implement the physical layer for data transmission between a controller and a disk drive. RS-485 is used for low-speed data communications in commercial aircraft cabins' vehicle bus. It requires minimal wiring and can share the wiring among several seats, reducing weight.
RS-485 is used as the physical layer underlying many standard and proprietary automation protocols used to implement Industrial Control Systems, including the most common versions of Modbus and Profibus. DH 485 is a proprietary communications protocol used by Allen-Bradley in their line of industrial control units. Utilizing a series of dedicated interface devices, it allows PCs and industrial controllers to communicate in a local area network utilizing a token passing medium access control. These are used in programmable logic controllers and on factory floors. Since it is differential, it resists electromagnetic interference from motors and welding equipment. In theater and performance venues RS-485 networks are used to control lighting and other systems using the DMX512 protocol. RS-485 is also used in building automation as the simple bus wiring and long cable length is ideal for joining remote devices. It may be used to control video surveillance systems or to interconnect security control panels and devices such as access control card readers.
It is also used in model railway: the layout is controlled by a command station using Digital Command Control (DCC). The external interface to the DCC command station is often RS-485 used by hand-held controllers or for controlling the layout in a network/PC environment. Connectors, in this case, are 8P8C / RJ45. Although many applications use RS-485 signal levels; the speed, format, and protocol of the data transmission are not specified by RS-485. Interoperability of even similar devices from different manufacturers is not assured by compliance with the signal levels alone.
0 notes
readydaq-blog · 7 years
Text
SERIAL COMMUNICATIONS - RS-485
Tumblr media
RS-485, also known as TIA-485(-A), EIA-485, is a standard defining the electrical characteristics of drivers and receivers for use in serial communications systems. Electrical signaling is balanced, and multipoint systems are supported. The standard is jointly published by the Telecommunications Industry Association and Electronic Industries Alliance (TIA/EIA). Digital communications networks implementing the standard can be used effectively over long distances and in electrically noisy environments. Multiple receivers may be connected to such a network in a linear, multi-drop configuration. These characteristics make such networks useful in industrial environments and similar applications.The EIA once labeled all its standards with the prefix "RS" (Recommended Standard), but the EIA-TIA officially replaced "RS" with "EIA/TIA" to help identify the origin of its standards. The EIA has officially disbanded, and the standard is now maintained by the TIA. The RS-485 standard is superseded by TIA-485, but often engineers and applications guides continue to use the RS-485 designation. RS-485 supports inexpensive local networks and multidrop communications links, using the same differential balanced line over twisted pair as RS-422. It is generally accepted that RS-485 can be used with data rates up to 10 Mbit/s and distances up to 1,200 m (4,000 ft), but not at the same time. A rule of thumb is that the speed in bit/s multiplied by the length in meters should not exceed 108. Thus a 50-meter cable should not signal faster than 2 Mbit/s. Under some conditions, it can be used up to data transmission speeds of 64 Mbit/s.In contrast to RS-422, which has a single driver circuit which cannot be switched off, RS-485 drivers use three-state logic allowing individual transmitters to be deactivated. This allows RS-485 to implement linear bus topologies using only two wires. The equipment located along a set of RS-485 wires are interchangeably called nodes, stations or devices. The recommended arrangement of the wires is a connected series of point-to-point (multi-dropped) nodes, i.e. a line or bus, not a star, ring, or multiple connected networks. Star and ring topologies are not recommended because of signal reflections or excessively low or high termination impedance. If a star configuration is unavoidable, special RS-485 star/hub repeaters are available which bidirectionally listen for data on each span and then retransmit the data onto all other spans.Ideally, the two ends of the cable will have a termination resistor connected across the two wires. Without termination resistors, reflections of fast driver edges can cause data corruption. Termination resistors also reduce electrical noise sensitivity due to the lower impedance. The value of each termination resistor should be equal to the cable characteristic impedance (typically, 120 ohms for twisted pairs). Somewhere along the set of wires, pull up or pull down resistors are established to fail-safe bias each data wire when the lines are not being driven by any device. This way, the lines will be biased to known voltages and nodes will not interpret the noise from undriven lines as actual data; without biasing resistors, the data lines float in such a way that electrical noise sensitivity is greatest when all device stations are silent or unpowered
0 notes
readydaq-blog · 7 years
Text
Tumblr media
Having troubles with controlling your RS232 device? This article will certainly help you understand almost all of the hardware and software standards for RS232.
Step 1: Understand RS232 Connection & Signals
RS-232C, EIA RS-232, or simply RS-232, refers to the same standard defined by the Electronic Industries Association in 1969 for serial communication. DTE stands for Data Terminal Equipment. Any computer is a DTE. DCE stands for Data Communication Equipment. Any modem is a DCE. DTE normally comes with a Male Connector, while DCE comes with a Female Connector. However, that is not always the case. Fortunately, there is a simple way to confirm this: Measure Pin 3 and Pin 5 of a DB-9 Connector with a Volt Meter, if you get a voltage of -3V to -15V, then it is a DTE device. If the voltage is on Pin 2, then it is a DCE device. Simple and easy. A straight-through cable is used to connect a DTE (e.g. computer) to a DCE (e.g. modem), all signals in one side connected to the corresponding signals in the other side in a one-to-one basis. A crossover (null modem) cable is used to connect two DTE directly, it does not require a modem in between. They cross-transmit and receive data signals between the two sides and there are many variations on how the other control signals are wired.
Step 2: Learn about the Protocol
A protocol is one or a few sets of hardware and software rules agreed to by all communication parties for exchanging data correctly and efficiently. Synchronous and Asynchronous Communications Synchronous Communication requires the sender and receiver to share the same clock. The sender provides a timing signal to the receiver so that the receiver knows when to "read" the data. Synchronous Communication generally has higher data rates and greater error-checking capability. A printer is a form of Synchronous Communication. Asynchronous Communication has no timing signal or clock. Instead, it inserts Start / Stop bits into each byte of data to "synchronize" the communication. As it uses fewer wires for communication (no clock signals), Asynchronous Communication is simpler and more cost-effective. RS-232 / RS-485 / RS-422 / TTL are the forms of Asynchronous Communications.
Drilling Down: Bits and Bytes
Internal computer communications consist of digital electronics, represented by only two conditions: ON or OFF. We represent these with two numbers: 0 and 1, which in the binary system is termed a Bit. A Byte consists of 8 bits, which represents decimal number 0 to 255, or Hexadecimal number 0 to FF. As described above, a byte is the basic unit of Asynchronous communications.
Step 3: Control your RS232 devices
After reading and understanding the first two steps we’ve talked about, it is easy to now test and controls your RS232 devices in order to get the perfect feel of how they work. ReadyDAQ offers software solutions for RS232 devices, make sure to check them out.
0 notes
readydaq-blog · 7 years
Text
INTRODUCTION TO RS232 SERIAL COMMUNICATION - PART 2
Tumblr media
Assume we want to send the letter ‘A’ over the serial port. The binary representation of the letter ‘A’ is 01000001. Remembering that bits are transmitted from least significant bit (LSB) to most significant bit (MSB), the bit stream transmitted would be as follows for the line characteristics 8 bits, no parity, 1 stop bit, 9600 baud.
LSB (0 1 0 0 0 0 0 1 0 1) MSB The above represents (Start Bit) (Data Bits) (Stop Bit)
To calculate the actual byte transfer rate simply divide the baud rate by the number of bits that must be transferred for each byte of data. In the case of the above example, each character requires 10 bits to be transmitted for each character. As such, at 9600 baud, up to 960 bytes can be transferred in one second.
The first article was talking about the “electrical/logical” characteristics of the data stream. We will expand the discussion to line protocol. Serial communication can be half duplex or full duplex. Full duplex communication means that a device can receive and transmit data at the same time. Half duplex means that the device cannot send and receive at the same time. It can do them both, but not at the same time. Half duplex communication is all but outdated except for a very small focused set of applications. Half duplex serial communication needs at a minimum two wires, signal ground, and the data line. Full duplex serial communication needs at a minimum three wires, signal ground, transmit data line and receive data line. The RS232 specification governs the physical and electrical characteristics of serial communications. This specification defines several additional signals that are asserted (set to logical 1) for information and control beyond the data signals and signals ground.
These signals are the Carrier Detect Signal (CD), asserted by modems to signal a successful connection to another modem, Ring Indicator (RI), asserted by modems to signal the phone ringing, Data Set Ready (DSR), asserted by modems to show their presence, Clear To Send (CTS), asserted by modems if they can receive data, Data Terminal Ready (DTR), asserted by terminals to show their presence, Request To Send ( RTS), asserted by terminals when they want to send data. The section RS232 Cabling describes these signals and how they are connected. The above paragraph alluded to hardware flow control. Hardware flow control is a method that two connected devices use to tell each other electronically when to send or when not to send data. A modem in general drops (logical 0) its CTS line when it can no longer receive characters. It re-asserts it when it can receive again. A terminal does the same thing instead with the RTS signal. Another method of hardware flow control in practice is to perform the same procedure in the previous paragraph except that the DSR and DTR signals are used for the handshake.
Note that hardware flow control requires the use of additional wires. The benefit to this, however, is crisp and reliable flow control. Another method of flow control used is known as software flow control. This method requires a simple 3 wire serial communication link, transmit data, receive data, and signal ground. If using this method, when a device can no longer receive, it will transmit a character that the two devices agreed on. This character is known as the XOFF character. This character is generally a hexadecimal 13. When a device can receive again it transmits an XON character that both devices agreed to. This character is generally a hexadecimal 11.
0 notes
readydaq-blog · 7 years
Text
Introduction to RS232 Serial Communication - Part 1
Tumblr media
Serial communication is basically the transmission or reception of data one bit at a time. Today’s computers generally address data in bytes or some multiple thereof. A byte contains 8 bits. A bit is basically either a logical 1 or zero. Every character on this page is actually expressed internally as one byte. The serial port is used to convert each byte to a stream of ones and zeroes as well as to convert streams of ones and zeroes to bytes. The serial port contains an electronic chip called Universal Asynchronous Receiver/Transmitter (UART) that actually does the conversion. The serial port has many pins. We will discuss the transmit and receive pin first. Electrically speaking, whenever the serial port sends a logical one (1) a negative voltage is effected on the transmit pin. Whenever the serial port sends a logical zero (0) a positive voltage is effected. When no data is being sent, the serial port’s transmit pin’s voltage is negative (1) and is said to be in the MARK state. Note that the serial port can also be forced to keep the transmit pin at a positive voltage (0) and is said to be the SPACE or BREAK state. (The terms MARK and SPACE are also used to simply denote a negative voltage (1) or a positive voltage(0) at the transmit pin respectively). When transmitting a byte, the UART (serial port) first sends a START BIT which is a positive voltage (0), followed by the data (general 8 bits, but could be 5, 6, 7, or 8 bits) followed by one or two STOP BITs which is a negative(1) voltage. The sequence is repeated for each byte sent. At this point, you may want to know what is the duration of a bit. In other words, how long does the signal stay in a particular state to define a bit? The answer is simple. It is dependent on the baud rate. The baud rate is the number of times the signal can switch states in one second. Therefore, if the line is operating at 9600 baud, the line can switch states 9,600 times per second. This means each bit has the duration of 1/9600 of a second or about 100 µsec. When transmitting a character there are other characteristics other than the baud rate that must be known or that must be setup. These characteristics define the entire interpretation of the data stream. The first characteristic is the length of the byte that will be transmitted. This length, in general, can be anywhere from 5 to 8 bits. The second characteristic is parity. The parity characteristic can be even, odd, mark, space, or none. If even parity, then the last data bit transmitted will be a logical 1 if the data transmitted had an even amount of 0 bits. If odd parity, then the last data bit transmitted will be a logical 1 if the data transmitted had an odd amount of 0 bits. If MARK parity, then the last transmitted data bit will always be a logical 1. If SPACE parity, then the last transmitted data bit will always be a logical 0. If no parity then there is no parity bit transmitted. A third characteristic is a number of stop bits. This value, in general, is 1 or 2. Stay tuned for part two, it will be published soon.
0 notes
readydaq-blog · 7 years
Text
Computerized Outputs
Tumblr media
Digital Outputs require a similar investigation and large portions of indistinguishable contemplation from advanced data sources. These incorporate watchful thought of yield voltage go, greatest refresh rate, and most extreme drive current required. In any case, the yields likewise have various particular contemplations, as portrayed beneath. Relays have the benefit of high off impedance, low off spillage, low on resistance, irresoluteness amongst AC and DC flags, and implicit segregation. Be that as it may, they are mechanical gadgets and consequently give bring down unwavering quality and commonly slower reaction rates. Semi-conductor yields regularly have a favorable position in speed and unwavering quality. Semiconductor changes additionally have a tendency to be littler than their mechanical reciprocals, so a semiconductor-based advanced yield gadget will commonly give more yields per unit volume. When utilizing DC semiconductor gadgets, be mindful so as to consider whether your framework requires the yield to sink or source current. To fulfill varying necessities, Current Limiting/Fusing Most yields, and especially those used to switch high streams (100 mA or something like that), offer some kind of yield security. There are three sorts most normally accessible. The first is a straightforward circuit. Cheap and dependable, the primary issue with circuits, is they can't be reset and should be supplanted when blown. The second sort of current constraining is given by a resettable breaker. Ordinarily, these gadgets are variable resistors. Once the current achieves a specific edge, their resistance starts to rise rapidly, at last constraining the current and stopping the current. Once the culpable association is evacuated, the resettable circuit returns to its unique low impedance state. The third kind of limiter is a real current screen that turns the yield off if and when an overcurrent is recognized. This "controller" limiter has the upsides of not requiring substitution taking after an overcurrent occasion. Numerous usage of the controller setup additionally permits the overcurrent outing to be determined to a channel by channel premise, even with a solitary yield board.
0 notes
readydaq-blog · 7 years
Text
Synchros and Resolvers
Tumblr media
Synchros and Resolvers have been used to measure and control shaft angles in various applications for over 50 years. Though they predate WWII, these units became extremely popular during WWII in fire/gun control applications, as indicators/controllers for aircraft control surfaces and even for synchronizing the sound and video in early motion picture systems. In the past, these units were also called Selsyns (for Self-Synchronous.) At a first glance, Synchros and Resolvers don’t look too different from electric motors. They share the same rotor, stator, and shaft components. The primary difference between a synchro and a resolver is a synchro has three stator windings installed at 120-degree offsets while the resolver has two stator windings installed at 90-degree angles. To monitor rotation with a synchro or resolver, the data acquisition system needs to provide an AC excitation signal and an analog input capable of digitizing the corresponding AC output. Though it is possible to create such a system using standard analog input and output devices, it is a fairly complicated process to do so, and most people opt for a dedicated synchro/resolver interface. These DAQ products not only provide appropriate signal conditioning, they also typically take care of most of the “math” required to turn the analog input into rotational information. It always a good idea to check the software support of any synchro/resolver interface to ensure that it does provide results in a format you can use. Most synchro/resolvers require an excitation of roughly 26 Vrms at frequencies of either 60 or 400 Hz. It is important to check the requirements of the actual device you are using. Some units require 120 Vrms (and provide correspondingly large outputs…be careful.) Also, some synchro/resolver devices, and in particular those used in applications where rotational speed is high, require higher excitation frequencies, though you will seldom see a system requiring anything higher than a few kilohertz. Finally, some synchro/resolver interfaces such as UEI’s DNx-AI-255 provide the ability to use the excitation outputs as simulated synchro/resolver signals. This capability is very helpful in developing aircraft or ground vehicle simulators as well as for providing a way to test and calibrate synchro/ resolver interfaces without requiring the installation of an actual hardware. Note: In some applications, the synchro/resolver excitation is provided by the DUT itself. In such cases, it is important to make sure that your DAQ interface is capable of synchronizing to the external excitation. This is typically accomplished by using an additional analog input channel.
0 notes