Creating a Defined Function Block in Modicon Conceptby C. StanleyThis article will show how to create user defined function blocks.
The first block, a summing junction, was chosen to be simple in nature to illustrate the steps in creation without unnecessary complication. Future articles will not be as in depth with creation mechanics and spend more effort on the functionality. The culmination of these series of articles will be a functional turbine speed control. The programming package for this series is Modicon Concept v2.6s.Fig.
Loadables for adding XMIT Block for Modicon Concept 2.6 SR3: LLAG function (PCFL Modicon LL, Concept 2.6) Modicon Quantum Programming by concept: Getting Modicon momentum Ethernet Adress for use in Concept software: Read coil status from slave using Modicon 984LL (concept).
1Summing junctions are found in control systems where a process set point is compared to the process variable and the difference is output. This summing junction will also include two additional inputs for feedback values. These values will be discussed in a later article. Future articles will feature additional user defined blocks. These blocks will be combined to create a speed controller for a turbine.
Create the Summing Junction Function BlockAssuming that Concept programming package is installed and a shortcut is on the desktop, click on Concept DFB icon. Click on File and then New DFB as shown in fig. 2 Assigning Names to Function Block VariablesNext click on Project select Variable declarations on the drop down. The variable dialog box will appear. This step allows the programmer to define inputs and outputs of the function block. The function block is only accessed through the input and output pins.
In that respect the user defined block is like an integrated circuit. The inner workings of the block are hidden from the rest of the PLC program. The block can be thought of as a new PLC instruction.Fig. 3Click the input radio button and enter the variables shown in illustration 3.
The SetPt is the first input and it represents the desired value for the process variable or second input to the block. The second input variable PrcVar represents the measured value of the quantity that we are trying to control. This function block uses the REAL data type for all inputs and outputs. There are many types available and it is possible to create compound data types made of more than one type.Two additional input variables are shown: FeedBk1 and FeedBk2. These represent feedback quantities. I will defer a discussion of these until a later article where their purpose will be made clear.Fig. 4, clicking the output radio button will open the output variable dialog box.
In this box we enter a single variable ProcErr. This variable will represents the difference between Setpt and PrcVar speed or the system error. Click on the OK button at the bottom of the viable dialog box to close the box.Fig.
5 Create a Programming Sheet for the Function BlockNext click on the project drill down icon, as shown by the upper pointer on fig. The drill down will appear without any sections or groups defined.
Right click on the top item in the drill down named Project and the New section dialog box will appear.Fig. 6 Name Programming Sheet for the Function BlockType in the name of SummingJct. The code type defaults to FBD of function block. One could also select on of the other types of coding as well but we are programming in FDB in this article. Enter a section name of “SumJct” as shown in fig. 6.New Group, if selected, creates a folder like object which can contain more than one section of related code.
One names the “Group” as one names a section. To create a section within a group click on the group icon just left of the group name.
Our function block is simple and only requires a single section. Click OK to close the dialog box.Fig. 7 Programming Sheet for the Function BlockClick on the FDB icon in the Project Browser window and a blank work sheet will appear. This sheet is like a CAD drawing. Using the icon on the tool bar, one can create a network of function blocks that resemble electronic drawings. With this blank sheet we will need to place some arithmetic predefined function blocks to process inputs and assign an output.Fig. 8 Inserting Function Blocks on the SheetClick on the FBD selection icon on the tool bar (upper most arrow) and then select the Arithmetic group and the ADDREAL block. While on the block selection box the cursor will be the normal arrow.
Moving off the box will cause the cursor to change to what is shown in fig. 9.For the SumJct block we are creating, I will leave the FFB from Library IEC dialog open and select the SUBREAL block after dropping an ADDREAL block with a left click on the sheet.Finally, there are six buttons on the bottom of the dialog box: Library. Allows selection of additional libraries. There are quite a few libraries to select more specialized blocks but it is beyond the scope of this article to discuss these. DFB allows selection of user defined function blocks such as we are creating in this article. The others are self explanatory.Fig. 9 Working with Predefined BlocksFig.
9 shows what was discussed in the last paragraph. Moving the cursor to the worksheet will cause the pointer to change to the cross hair and function block icon.
Left clicking on the worksheet will drop the selected block on to the sheet at the location of the cross hair. Press ESC to return the cursor to a pointing device instead of a function dropping device mode. We are now in position to assign inputs and output variable previously defined to the function block pins.Fig. 10 Expanding Inputs Available on Some BlocksThe ADDREAL block in fig. 10 can take more than two inputs.
This is indicated by the black square on the bottom of the block. Placing the cursor on the black square and dragging down will reveal more inputs. Add two more inputs. The SUBREAL block does not have this property because it does not have the black square. User Defined Blocks in general do ot have the ability to have expanded inputs because there is no way to express this in the limited programing tool set provided.Fig. 11 Assigning Variables to Input Pins:To assign inputs to the ADDREAL Function block, click on each input. This click will open a dialog box allowing you to select from the available input variables previous defined.Fig.
12 shows clicking on Lookup button to reveal a list of the previously defined input variables.Fig. 13Click on PrcVar to select the first input to the ADDREAL function block by pointing to it and double clicking it as shown in fig. 14Repeat the input selection for the remaining two inputs, FeedBk1 and FeedBk2, for the ADDREAL function block. Shown in fig. 15 Assigning Variables to Output PinsFig.
15 shows clicking on the output pin on the SUBREAL will bring up only one variable for selection. Chose ProcErr by double clicking it. Notice that clicking on an output pin only shows one variable. This variable was the only variable we previously defined as an output. We are nearly done assigning variables.The SUBREAL block will be assigned the SetPt input variable on its first or upper input pin.The second SUBREAL pin will be “wired” to the output of the ADDREAL block, the subject of our next topic.Fig. 16 Wiring Between Output and Input PinsIn fig. 16 above, I select the function block wiring tool shown with the arrow.
This tool will allow me to connect the output of the ADDREAL block to the lower input of the SUBREAL block. The function block programming allows outputs to be assigned to another function block without using intermediate named variables. This is great because it cuts down on the number of variables needed for a program.Also, note that in fig. 16 the SUBREAL block is surrounded by a blue box. This indicates that the block is “selected”. Hitting the delete key will delete the block.
Press Ctrl-C and Ctrl-V to copy and paste the block. More than one block can be selected at a time.
Wiring is preserved to and from the clip board. In fact the whole sheet can be selected with Ctrl-A and repasted back to the sheet. The execution order for the blocks on a sheet can be changed this way. More in later articles about execution order and changing the order.Fig.
Convert cd to flac for mac. Xld is very good for me to convert SACD-ISO to Flac.I found xld-20181019's DSD filter can't choice IIR filter. Can Xld add noise filter choice. When I convert a DSD to 88.1kHz Flac, find many quantization noise above 30kHz.
17The cursor changes from the arrow to a wide cross hair when the wiring tool is selected. The wide cursor is shown on the above illustration as the upper most cross hair.
The wide cross hair changes to a thin cross hair when the cursor is moved to a suitable function block pin. The check mark also indicates the cursor is over a suitable pin. 17 above.To connect or wire pins together, one can click the first pin and either hold down the left mouse button and drag the cursor to the next pin or left click the first pin and move the cross hair to the next pin and left click. The outputs of an output pin can be connected to multiple inputs of other function blocks. There is no fan out limit. The pins must have the same type in order to make a connection, e.g. REAL to Real, INTEGER to INTEGER etc.
The reader can see the first input to the SUBREAL block was assigned to SetPt. This was done in a similar fashion as the inputs to the ADDREAL block but not shown.What we have at this stage is the summation of the PrcVar, FeedBk1 and FeedBk2. This summation is subtracted from the SetPt input and the result supplied as the output of the SUMJCT block.The summation and subtraction process is common in a process controller. I will use this block in two different ways in the final composition of a turbine speed control.Fig.
18 Saving the Completed BlockIn fig. 18 I will save my newly created block by clicking on File and then on Save as.Fig. 19, I name this block “sumjct.dfb” and then click OK. This makes the sumjct DFB visible in the Concepts programming package DFB library. I can select it just like I selected the predefined ADDREAL and SUBREAL function blocks when writing a PLC program or user defined function block.The sumjct block is generic in nature so that it can be used in various parts of our turbine governor.The function it performs is comparing the Process set point to the Process controlled variable and outputting the difference. The process controlled variable value can be modified by one or both feed back inputs. This summation action forms the heart of a classic controller.
In later articles, I will show how modification of the various quantities in the control system can be fed back in to the summation junction to create a stable controller.The next articles will show the development of two additional user defined function blocks: PID and Reference. The PID will be developed in a couple forms. These blocks will be combined into a turbine speed or load controller. A bit of practical control theory will be covered to aid in understanding the controller. The final controller will fit on one PLC programming sheet because I am using user defined function blocks.
Creating an Integrator Function Block in Modicon Conceptby C. StanleyThis is the second article in a series that shows how to create user defined function blocks using Modicon Concept v2.6 programing software. This article will show how to create an integrator function block.Many basic control system component blocks contain an integrator function. Some examples are PID, Lead-Lag and filter blocks.
An integrator function has an output that is the time integral of the input signal.out= K ∫ in dtThe integrator function described in this article will be an approximation of the above expression, where K represents the integrator gain and dt is the PLC scan time interval: out=K.∑in.scan interval.Fig. 1 Assign Inputs VariablesThe steps to create a new blank function block are not shown but can be found in the first article in this series on creating a summing junction. Click on Project then select Variable declarations on the drop down.
Select inputs by clicking the Input radio button and enter the shown variables. The variables named outmin and outmax are limits on the value of the output.
Variables initref and setref are used to preset or initialize the output of the integrator function. When setref is 1 or TRUE the output of the integrator is set to the value of initref. When setref is 0 or FALSE the integrator is operating. In all cases, the output of the integrator is constrained to be between the outmin and outmax limits.Fig. 2 Assigning Output VariablesClick on Output radio button and enter the shown variables. The variables atmin and atmax are set to 1 or TRUE, if the output out equals the value of the limits outmin or outmax. It is often useful to know when an integrator is maxed out.
For example, the integrator output could represent a rotating vector’s angular displacement. Every time the displacement reaches 2π radians, external logic can reset the integrator to 0 radians. In this example the input would represent angular velocity of a vector rotating clockwise. The number of reset events would represent the number of turns of the vector. The integrator output would represent current position or displacement of the vector.Fig. 3 Naming the Integrator SectionClick the Project browser tool bar icon. Next, right click on Project: noname, and then click on New section.Fig.
4Name the section integratorsec as shown in fig. Leave the default coding FBD radio button enabled.Fig. 5 Create a Programming Sheet for the Function BlockNext, right click (double left click does same) on the project drill down icon, as shown by the upper pointer on fig. 5 to bring up the newly created programing sheet.Fig. 6 Coding the Integrator FunctionUsing the tool bar icon Show FFB selection Dialog which is the icon pointed at by the upper right pointer in Fig. 6, place two arithmetic functions on the sheet.
This is shown in Fig. Using the tool bar icon Show Link creation mode which is the icon pointed at by the upper left pointer in fig. 6, wire the output of the MULREAL to the lower input of the ADDREAL block.
Finally assign the inputs to the function blocks as shown in Fig. My previous article on creating a summing junction shows the wiring and variable assignment operations in more detail.Fig. 7Click again on the Show FFB selection Dialog icon to bring up the FFBs from Library dialog box. This time click on the DFB button to select a user defined function block.Fig.
8 shows a user defined function SCANTIME. This is a function I created to return the elapsed time in seconds of the last scan.
The reader will not have such a function. I am using this function as a way to illustrate the introduction of time into the integration function I am creating. The integrator I am creating will work using this function.
There is a problem. SCANTIME can only be called once per scan in a PLC program because it returns the elapsed time between calls. Calling it more than one time per scan may produce unpredictable scan times.
I will resolve this issue later in this article.Knowing the scan time, which can be variable, is required in PLCs that control physical processes in real time. Each PLC manufacturer has different ways to determine scan times. The top end PLCs often have multiple mechanisms for scheduling sections of code based on time as well.
One could place the integrator function in a fixed period scan schedule of say 10 milliseconds in a PLC that would provide this. In this case scan time would be a constant 10 milliseconds.Fig. 9 Working with the Selection BlockFig. 9 shows the selection of a Selection group in the IEC library and SEL function in that group. The SEL function is an un-typed or generic function that gets its type from the type of the variable assigned to its input.
The output will be the same type as the input. The SEL block selects its output from one of two inputs based on the value of a BOOL input.Fig. 10 Wiring the SEL BlockThe SEL block G input is a BOOL type. When G is a 1 or TRUE the output is the value of IN1. When G is a 0 or FALSE the output is the value of IN0. The assigning variables to the SEL block is a sticky operation. In other words, once you assign a variable to a specific instance of SEL, that instance will always have that type as input and output.
If you assign the input as a REAL one can not reedit that instance to accept an INT. One needs to delete the SEL instance and insert a new SEL block if the type of the inputs to the SEL block change. This reasoning applies to the rest of the generic or un-typed functions of Concept libraries.
By the same reasoning, one needs to wire or assign inputs of the generically typed blocks before assigning the output.When editing function block sheets in Concept, one can select a function block that currently exists on the sheet by clicking it. The block will show it is selected by exhibiting a blue box around itself. Pressing Ctrl-C copies it to the clipboard. Paste it onto the sheet with a Ctrl-V. Copying generic typed instances in this manner also preserves the type of the copied instance, which may not be the type you need for your edit. It is best to get new instances of generic types such as SEL or MOVE.Fig. 11 Initialization CodingIn fig.
11, the SEL block G input was wired to an input setref. The IN0 was wired to the ADDREAL output. The IN1 input is about to be wired to the initref variable. The integrator is initialized with the SEL block. The integration operation is actually done in the ADDREAL block starting from the initial value on the next scan. Note that the out variable is used as an input and as an output. The SEL block is inserted in a position that allows it to over ride the output of the ADDREAL.
This allows the caller of the integration function to initialize the integrator whenever setref is a 1.Fig. 12 Implementing Integrator Upper LimitFig.
12 shows the selection of the Comparison group and GTREAL function from the IEC library. The GTREAL block will be wired to limit the integrator output to the value of the outmax input variable.Fig. 13 Implementing Integrator Lower LimitFrom the Comparison group select the LTREAL function. The integrator limits are important in preventing windup. Windup occurs when the process error is such that an integrator accumulates a value that is way more than a physical device can accommodate. For example, a linear servo motor can only travel from 0% to 100% stroke.
An integrator is used to hold the desired position of a servo motor which is only 0% to 100%. What will happen when this integrator accumulates a position of 10000% servo stroke? It will take a long time to unwind the integrator. What will the process be doing with the servo motor pegged at 100% while the integrator unwinds? Hopefully not damaging the rest of the plant!In using integrators, the programmer is interested in both the output value and the rate the integrator output changes for a given input. The input to integrators used in control systems is often a process error.
The output of an integrator is often used to control a device that controls the physical process such as a valve-servo motor combination.Fig. 14, shows comparison block wiring to limit integrator windup.Fig. 15 Using MOVE BlocksFig. 15 shows the selection of a MOVE block. MOVE blocks are curiously found in the Arithmetic group. The MOVE block can move just about any type of data to another location. MOVE blocks are generic instances that take the type of the first assigned input.
As mentioned previously this assignment of a variable to a MOVE block input also assigns the type of the move. This assignment is sticky.Fig. 16 Hidden Enable PinsFig.
16 shows double clicking on the MOVE block bringing up an information window. By clicking the Show EN/ENO check box, the enable pin becomes visible.
The enable pin makes the execution of a function block conditional. If the enable pin is 1, then the block will be executed. Conversely, if it is 0 the function will not execute.
Concept works this way, however I have found considerable differences in PLC programing software. The MOVE block is particularly subject to varying functionality as found in other programming packages in regards to Enable pin function. For example, Rockwell RSLogix implements this functionality quite differently. There is often a difference in the functionality of the MOVE block between function block programs and ladder programs in the same programming package.
Be sure to write test programs to determine exactly how a block such as the Move block works when switching between manufacturers programming packages or programming languages within the same package.Fig. 17 Multiple Assignment WarningsMultiple function blocks can assign outputs to the same variable. 17, this is shown.
Without using Enable pins this could be an error and cause unpredictable results. Concept generates a warning about multiple assignments.Fig. 18 Coordinating Enable PinsThe two MOVE blocks in fig. 18 effectively clip the output of the integrator to be between the limits specified in the input parameters. A Move block is needed to pass the integrator output when it is not at one of the limits.
To do this, I insert an OR block to control a yet to be inserted MOVE block.Coordinating enable pins can be tough because of execution order. 18 the function block execution order is listed in parentheses above the block. When editing sheets it is sometimes necessary to change execution order.
I have found this trick: design the sheet to execute left to right ignoring the actual execution order. Select the whole sheet with a Ctrl-A, cut the whole sheet to the clip board with Ctrl-X, then paste clip board to sheet with Ctrl-V. The execution order will be reordered left to right and top to bottom. Pasting preserves the layout of the sheet but reorders execution.Fig. 19 the wired OR block is shown, however the output of the OR block needs to be inverted for the.1.26 MOVE block function to pass the integrator output to out when the integrator is not limited out.Fig. 20 Invert Bool Pin ToolFig.
20 shows the use of the invert Bool tool. The upper pointer shows clicking on the invert icon on the tool bar. The cursor will change to the one shown just above MOVE block.1.26. Moving the cursor to the pin you would like to invert will show a check mark when the cursor is in the correct position to be applied. Inversion can be applied to BOOL input or output pins of functions. After inversion, the pin will show a small circle indicating its inversion.Fig. 21 How the Integrator WorksThe integrator works by multiplying the input times gain times time interval in seconds.
The result is added to the output of the last scan. The SEL block provides for the resetting of the integrator to a new value initref when setref is 1. The final result is compared to the integration output limits: outmax and outmin.Fig.
22 More How the Integrator WorksThe inverted output of the ORBOOL enables the upper most MOVE block to pass the integrator output to the out pin of the integrator block when the integrator is within limits. Otherwise, the other two MOVE blocks replace the output with their respective integrator limit.Fig. 23 Concept CONTCTL Library IntegratorConcept CONTCTL library has an integrator block that is similar to the one constructed in this article. Select the library as shown in fig. 24 Concept Integrator BlockThe continuous control library has a block named INTEGRATOR. I pasted the block on to the work sheet for comparison purposes in fig. 25 Concept INTEGRATOR BlockThe INTEGRATOR block has the same inputs as the one I constructed as shown in fig.
Double clicking on the INTEGRATOR block will bring up the information window. There is a help on type button on the information window. Clicking on this button brings up a substantial written description on this block. The next article in this series will be on derivative blocks and will include more about the help on type information.The INTEGRATOR block is interesting because it has a self contained notion of time that appears to my testing to be independent of scan time. The integrator developed in this article used my function block Scantime as a time base. This use is not very satisfactory but served the purpose of describing integrator function.
The Concept library function INTEGRATOR in my experience works very well. The integrator developed in this article would be more robust if the scan time were passed as an argument on an input pin.Fig.
26 Using the Comment ToolIn fig. 26, I use the Comment Tool. Clicking on it brings up a text dialog box in which you can enter comments. After clicking OK, the cursor will change to the comment placement cursor. Place the cursor where you would like the comment to appear and click again to drop it on the sheet. The comment cursor is sticky and allows additional comments to be dropped where needed. Pressing ESC key will return the cursor to normal.
Comments can be moved by placing the cursor on it, hold down the left mouse key, and drag it to the new location. They can be cut/pasted to the clipboard as well.This completes the integrator article. As previously mentioned, the next article will be on derivative blocks. Both derivative and integrator blocks are used in the PID block. The PID block will be covered in a future article.
Modbus FAQ General1. What is MODBUS?MODBUS is a commonly used industrial communications protocol.
It allows the exchange of data between PLCs and computers. It was originally designed for Modicon (Schneider Electric) PLCs but has become widely used by many PLC manufacturers and industrial networks.2.
Why would I use MODBUS?MODBUS is a common means of gathering data from many different sources for viewing operations, archiving and troubleshooting from a central remote location. It is widely used and a fairly simple protocol. Depending on the application a newer protocol may have more advantage.Typically a PC is set up running such programs as Wonderware, Intellution or LabVIEW in one location to gather data from various processes around the factory. Another application is for setting up remote factory process controllers (such as other PLCs like Allen-Bradley, Siemens, PLCDirect, etc.) to respond to different levels or modes that are being transmitted from the device.3. How does it work?Devices using MODBUS communicate using a master-slave technique, in which only one device (the master) can initiate transactions (queries). The other devices (the slaves) respond by supplying the requested data to the master, or by taking the action requested in the query. The master can address individual slaves, or can initiate a broadcast message to all slaves.
Slaves return a message (response) to queries that are addressed to them individually.The History ' protocol establishes the format for the master's query by placing into it the device (or broadcast) address, a function code defining the requested action, any data to be sent, and an error-checking field. The slave's response message is also constructed using Modbus protocol. It contains fields confirming the action taken, any data to be returned, and an error-checking field.
If an error occurred in receipt of the message, or if the slave is unable to perform the requested action, the slave will construct an error message and send it as its response.4. Is MODBUS Plus the same as MODBUS?No, they are different protocols and not compatible. To link the two protocols a converter like is needed. This FAQ only applies to Modbus serial communications.5. Is MODBUS TCP/IP the same as MODBUS?No, they are different protocols and not compatible. A converter from MODBUS serial to MODBUS TCP/IP Ethernet is needed (for instance the EIS-2B Series Industrial MicroServers from Omega Engineering).
This FAQ only applies to Modbus serial communications.6. Where can I find out more about MODBUS?. Modicon’s MODBUS Protocol Guide:. The MODBUS Users Web Site:Networking7.
What is a master-slave network?A master-slave technique is one in which only one device (the master) can initiate transactions (queries). The other devices (the slaves) respond by supplying the requested data to the master, or by taking the action requested in the query. Typical master devices include touch screens or PCs running Wonderware, Intellution or LabVIEW while slaves include PLCs and smart devices such as controllers or meters.8. How can I connect MODBUS devices together in a network?outputs cannot be connected together. To create a network the devices must use a network and have a unique slave address.References:. AutomationDirect FA-ISOCON manual:. Dataforth DCP485 manual:9.
Will I damage something if I get the wires swapped?No, the RS-232/422/485 standards are designed to withstand short circuits and swapped wires. Damage may occur if a voltage greater than 25 volts is placed on one of the lines.14. Do I have to turn off the PLC and other devices to connect the wires?This is the only recommended safe way to install wiring.15.
How far away can devices be away from each other?For an RS-232 connection the maximum distance is 15 meters.For RS-422 and RS485 connections the maximum distance is 4000 meters.Repeaters can be used to increase the distance.16. What sort of cable should I use?A shielded #18AWG cable with twisted pairs is recommended. The shield should be grounded on one end only. What are the communication settings?This is unique to each device. Consult the manufacturer’s manual.
A typical setup hasRate:9600Parity:EvenData Bits:8Stop Bits:118. What are ASCII Chart ' and RTU modes?ASCII (American Standard Code for Information Interchange) uses 10 bits of data comprised of 7 data bits, 1 parity bit, 1 start bit and 1 stop bit. It uses LRC (Longitudinal Redundancy Check) for error checking.
The advantage of ASCII is it allows up to 1 second time intervals to occur between character transmissions without generating an error. It's most useful when communication is slow.RTU mode (Remote Terminal Unit) contains 4 bit hex characters divided up into 8 data bits, 1 parity bit, 1 start bit, and 1 stop bit. It uses for more detailed information.'
(Cyclical Redundancy Check) for error checking. RTU has the advantage that it can send more data in the same amount of time but it has to be in a continuous stream (no delays between characters).19. OK, that was too much information for me. Should I use RTU or ASCII?RTU is the most commonly used. Where do I find information on identifying the addresses?This is unique to each device. Consult the manufacturer’s manual.21. What is a coil?This is a single bit of information indicating either an ON (1) or OFF (0) state.
Types of coils include valve states, alarms/warnings and status.22. What is a register?This is a 16-bit data field. The data can be in binary (decimal), hex or format. Types of register data include temperatures, pressures, times and PID variables.23. Why do some addresses have only four digits when I expect five?Typically there are two ways that MODBUS can address the PLC:#1 - Most software packages allow you to specify the MODBUS data type and address. This is the easiest method and most often used.#2 - If your host software package specifies an address only then you will need to determine the addressing mode as either 484 or 584/984.
If the address is supposed to be four digits then it is 484 mode. If the address is to be five digits then it is 584/984 mode. The following table shows what will need to be added to the existing address:484 mode584/984 modeCoils+ 1+ 1Registers+ 4001+ 4000124. Why is the addressing off by one?Some Modbus master devices compute register locations differently so the actual address might be shifted by one.
This is often referred to as “adding the offset”.25. Can I write a value to the PLC?Yes there are both read and write functions.26. Can I control the PLC remotely through MODBUS?Only if the PLC program is programmed to do it.
How can I test the MODBUS connection?The best way to do this is to have a separate computer/laptop with the ability to monitor MODBUS by acting as a Master station.Vendors that have stand alone MODBUS testing software include:. Ocean Controls -. Wintech Software -. LabVIEW can be used but the MODBUS component called BusVIEW must be purchased first from SEG Corp.The only cable required to test MODBUS is a three conductor, wired to one end with a standard 9 pin connector for the computer com port and the other end loose to tie into the customer interface terminalsThe 9 pin terminal 2 is Rx, terminal 3 is Tx, and 5 is GND (or Common). So the Rx on one end goes to the Tx on the other and vice versa, and the GND goes to GND.To test an RS485 connection first establish that the RS232 side is working by disconnecting the RS232/485 converter and testing by the above method. Once the RS232 side is confirmed as working the only way to verify the RS485 connection with a PC is to use another RS232/485 converter to convert the signal back into a RS232 signal that the PC can read. A converter on another PLC can be used for testing but the RS232 side of the converter must be disconnected first before using the PC.28.
I’m getting communication time out errors and I can’t get the device to communicate with my software? What could be wrong?. Transmit and receive signals can often be verified by watching the transmit and receive lights on the Modbus components. The communication parameters are not set up correctly on the device. Check the settings match for slave address, baud rate, stop bit and parity.
Make sure the host software has the same configuration. The transmit and receive wires are crossed.
Try switching the wires as it will not cause any damage. Check the conductivity on each wire for loose connections or broken wires. High power lines or improper grounding is causing noise in the system. Are the communication cables shielded and is the shield grounded on one end.29. The MODBUS data does not match what is on the screen. What is wrong?.
The addressing may be off by one depending upon how the host software handles addressing. Slow communications may delay updates on MODBUS data. Host software is not configured to continually poll for new readings.
The data format may be set up incorrectly. Refer to the user manual’s MODBUS table for the data formatting. Typically the data will be in binary/decimal format.
In certain situations the data may be in hexadecimal. Some data has implied decimal places so that a value of 432.1 will be 4321 in MODBUS. Some large numbers may require two addresses. This is called a double word. The low address (word) will contain the first four places while the higher address (word) will contain the upper four digits. For a quick conversion take the (high word X 10000) + low word. Sometimes scaling is required to derive the proper number.
The scaling is indicated on the MODBUS table where the actual data is given and then the scale value. For example, if the actual reading is from 0 to 4095 and the scaling is from 0 to 100 then the actual value will have to be divided by 40.95 to get the proper scaling. Modbus Plus Traffic Issues in Bridge Plus DevicesCourtesy of:It is important to keep in mind when deciding the routing paths for your data transmissions which utilize more than one Modicon Bridge Plus device, the amount of traffic which may attempt to flow through it.While a 'backbone' of bridges on the main trunk of a History ' Plus network is generally the most efficient design for larger systems, problems can arise when data is requested from nodes that route over more than one bridge. A bridge plus device has eight master and eight slave paths for utilization of data transmissions. Additionally, there are paths reserved for programming use only.
When all of the data paths are busy in the bridge, the incoming transaction will be queued in the first bridge plus device. Once a path becomes available, the queued transaction is removed from the queue and given a path. A response is only returned to the origin when a complete path is made to the destination. Since a bridge must open ports on both sides and maintain the proper timing, a transaction will only be queued in the first bridge and not in subsequent bridges for transactions that utilize multiple bridges. This will result in lost data or data not getting to or from the proper nodes, with no logical indications.Utilizing the MBPSTAT program supplied with your computer Modbus Plus network card, monitor the traffic on each side of each bridge located on your network, to determine how many paths are being utilized at one time.
If traffic is indicated on all eight paths, it is possible that some messages may be queued for transmission. In fact, it has been the experience of Delta's Engineers, that if the traffic exceeds an average of about 75% (six paths), that this bridge is beginning to get overloaded and may pose future problems. The ultimate solution is to add an additional bridge in 'parallel' (with different addressing of course), and re route some of the traffic over the new bridge.These are the types of issues and problems that can be avoided by utilizing the network services of Delta Automation Inc.
For all of your network design and support needs. A complete written report is generated with a network certification which includes distances, token rotation time, cable resistance, and a graphic display. All of this information is important for future planning for expansion, maintenance and servicing. Delta Automation Inc. Certifies Modbus Plus, Modbus 11 and Remote I/0 networks in metallic and fiber optics. Modicon Redundancy System I/O Hold-up TimeCourtesy of:The default setting for the remote I/O hold up time (HUT) on a Modicon system, is 300 milliseconds. This determines the amount of time that the discrete outputs associated with a particular drop will remain in the 'on' state once communication with the processor is lost.
This loss can be due to a power loss at the drop or a cabling problem for example. With the default setting of 300, the discreet outputs will de-energize after 300 milliseconds (0.3 seconds).modules behave differently. The analog modules options are: go to zero, hold last value, or go to a preset value. These options are all chosen in the traffic cop (I/O map) area of the configuration screen. This default time setting is usually adequate for most stand alone systems.The purpose of a redundant PLC system is to allow the application or process to continue to operate in the event of a PLC processor type failure.
This is accomplished by 'moving' the I/O points from the control of one processor to another if a failure should occur. This switch-over takes a finite amount of time, during which the I/O is not communicating to the processor. Typically, on Modicon systems it can take several scans of the processor to complete the switch-over.
El animal social aronson 8 edicion pdf. On large applications, at 0.3 to 1.4 milliseconds per K of logic, this can be longer than the default setting of 300 milliseconds. If the switch-over time takes longer than the hold-up time, the I/O will have lost communications with the 'failed' processor and began its timing sequence and will ultimately drop out or de-energize.
This would cause an application or process to stop.In these types of systems Delta Automation, Inc. Suggests that the time be set to 1500 milliseconds (1.5 seconds). This setting is accessed on the traffic cop or I/O map screen associated with each drop.
There are several items to be very careful of when changing this value. First, the value that you enter is already in hundreds of milliseconds, for example 300 milliseconds is entered as just '3', and 1500 milliseconds is just '15'. Secondly, the PLC software will allow you to enter an enormous value.This can be extremely dangerous as the I/O will remain on and active even with the processor turned off! With NO CONTROL!It is advised that the time never be set greater than 15 (1500 milliseconds).Also, in some versions of the PLC programming software, you cannot just highlight the '3' and replace it with a '15'. If you attempt to do this you will get an error message.
A work-around is to enter a '5' after the '3', then type over the '3' with a '1' to get a '15'.
I am struggling with the following problem: We have a Momentum PLC running with a project downloaded from Concept 2.6. When I make a small change into the project and I download the change to PLC there seems to be no problem. But when I try to run a visualisation project in Vijeo Look then after any click in visualisation the yellow triangles with red crosses appear over every object on the screen. We run OFS to enable communication between PLC and Vijeo Look. We use non-allocated variables in the project and probably the Visualisation does not work well with those unallocated variables after project changes.
Can someone please describe steps which need to be taken to compile or upload a Concept project so that it works well in Vijeo Look with unallocated variables? Thank you, both answers are useful, I did not expect any answer so soon on such a specific subject. I was searching OFS documentation but found no steps how to 'reload OFS server with the new project'. The Alias Properties has Symbols table file path, which points to the same PRJ file I have modified in Concept. Does it mean I have to upload some initial RAM directly from PLC to Concept after downloading project changes from Concept to PLC? Cannot find how to update OFS or where is the variables mapping stored. I have also found this advice, but not sure if it applies to my problem:Edited 2 Jul 2015 by vodoca.
Hi vodoca, you understant this right. In the OFS configuration you choose your PRJ file from Concept, so that OFS knows the variables names and their addresses. Does it mean I have to upload some initial RAM directly from PLC to Concept after downloading project changes from Concept to PLC? Cannot find how to update OFS or where is the variables mapping stored. As I unterstand (I never used not allocated variables in Concept + OFS) just after some changes in Concept you save your Concept application as PRJ. During restart of OFS, the OFS reads PRJ+VAR file to get new information about new addresses.
Also this steps are necessary to let it work: - In the file c:windowsconcept.ini change the parameter ExportVariables = 0 to 1 -cc2cat.exe / RegServer. I have recieved info from Schneider technician, that when PRJ is used that the VAR file is not necessary for OFS. I should turn on Dynamic Consistency & Check Device in OFS alias configuration.
But the main problem seems to be the fact, that I have used Concept 2.6 to change & upload the project, but the project was created originally with Concept 2.5. The best way to get from this OFS hell is to make all the variables located to specific addresses. I will need to connect to a spare PLC we have and test it in my office. Would you perhaps please suggest, what is the most simple way to power on this PLC using normal office equipment, like old power sources from switches, computers etc?
So finally I had to setup test environment with a spare PLC modules.