soundwave

MrPLC Member
  • Content count

    61
  • Joined

  • Last visited

Everything posted by soundwave

  1. CJ1M Slave on Existing Modbus Network

    Hello All, I wanted some help understanding the concepts involved with an omron PLC acting as a slave on an existing modbus network that contains Allen Bradley and SCADA nodes ( no omrons i believe) I have - CJ1M CPU23, SCU41 comms card, ModbusV5 (thanks to sleepy wombat) , CX-1 with Protocol 1.6. Serial port 1 of the SCU41 card is used as a master that polls two power meters on a new modbus network. I have this program working now and am ready to take the next step which is using Serial Port 2 to connect to an existing modbus network. The PLC will be seen as a slave on this existing network. I plan to connect Serial Port 2 of a SCU41 card ( via a RS232C to 485 converter ) to the existing modbus network. I would be required to send a block of 10 words back to the master when requested. These words will contain power measurements in real time. So the questions are as follows and relate to the PLC being a slave on an existing modbus network. I am not familiar with the modbus protocol but have now had a little experience with the PCMR instruction. -------------------------------------------------------- Assuming I have a modbus node address of 1 in the existing network. The master will send a message statement node 1, read 10 words, from starting address D100, modbus command 03 01 03 0100 10 (probably not the message statement but for now…) 1…………………………………… First of all how do I know when this message is sent so that I can execute the PCMR instruction? Basically I am asking how I listen for this command or does the PCMR do this for me. 2…………………………………….. Once I have heard the broadcast how do I identify it is for me? Or again is this part of the PCMR instruction? 3………………………………….. Lets assume I have verified the data is for me. I then should check that the data address is what I was expecting. I should also check that the number of words does not exceed what I was expecting. I am sure I can specify where and how many address the master can request. And data memory ie Dxxx is the address where i could store both the request for words and words to be transmitted? 4……………………………………. Lets Assume I am happy the request is for a valid address and valid number of words. Would I then execute the PCMR instruction? This would then transmit the number of words requested from the address requested (both previously known) The transmission is complete and I wouldn’t know if the master received the words or not (two wire). But I could test this with a test master at work when i complete the program. ---------------------------------------------------------------------------------------------- As I previously stated I am now a little familiar with the PCMR instruction but I plan to begin a program tomorrow for teh PLC as a slave. I would like a better understanding of what was required before I delve in too deep with the wrong concepts. Thanks Gents,
  2. Just wondering if anyone has used a PLC to update the time and date on the NS display screens. I have checked the NS manuals but from what i have seen (so far) is methods for manual setting the clock. I want the PLC and NS times to be synchronised for accurate time stamping of alarms when compared to other equipment around the plant. cheers,
  3. NS Screen - Updating Date & Time via PLC

    you are right Tashniz, I was confused with Nibrocs Post I didn't realise that the smart active parts could be executed on an event i will have the PLC change a bit at midnight the smart active part will see this as an event and update clock sorry for the wasted time again i thought smart active parts were user inputs requiring manual activation, i didn't know you could trigger one on an event
  4. NS Screen - Updating Date & Time via PLC

    Not a problem Alberto, thanks again for you time and help
  5. NS Screen - Updating Date & Time via PLC

    Thanks Nibroc you have had the solution for a number of my problems, I will use smart active parts to manually update the NS display. I initially was after an automated solution but as time has passed i have put it in the "additional time bin". All the best luck for you in your next struggle Nibroc after helping me again.
  6. NS Screen - Updating Date & Time via PLC

    Hello Alberto, First of all thanks for replying to this post. You have commented well and I do understand the code but I have some trouble with the FINS(…) function. Could you direct me to a manual which shows the arguments for this function? ----------------------------------------- From your code; The macro is executed depending on the on/off condition of $B32000 If $B32000 is left on the macro will execute continuously. I therefore operate this bit $B32000 via the PLC, every morning for example '''Write calender information from PLC to PT 'Macro startup trigger OFF $B32000=0; You then read in the time from the PLC at $W32000 which is the PT internal memory. You then move this time to another memory location, I assume this is to give the NS screen independent memory area before the SETTIME function. Could you direct me to information on the FINS function listed below. At the moment I have an ethernet connection between PLC (network 1, node 9, unit 0) and the NS Screen (network 1, node 19, unit 0) 'Read calender information from PLC FINS(0,0,0,"0701",0,2,0,11,$W32000,0); $W32040=$W32004; $W32041=$W32003; $W32042=$W32002; This section would be used to write from the NS screen to the PLC? In my installation the time synch source will be sent to the PLC and then to the NS screen. So I can ignore this just as you have commented it out of the program 'Adjust PLC calender information '$W32001=H0702; 'FINS(0,0,0,$W32001,9,1,0,4,$W32020,0); This is the write function as you have stated 'Write calender information to PT SETTIME($W32040);
  7. NS Screen - Updating Date & Time via PLC

    Sounds like you have found the solution I am after ECSI I haven't used macros as yet so i will investigate and then apply and post the success.
  8. NS Screen - Updating Date & Time via PLC

    Thanks Bits n Bytes that is definetly the docuemtn to reference. After an attempt I have had no luck. I believe the NS screen keeps it's clock as read only unless manually adjusted. The following will explain the procedure; The HMI requires a shared data area with the PLC. This is called SYSTEM MEMORY. The time and date information is located in the SYSTEM MEMORY. I needed to share this information between the PLC and the NS Display Note that the PLC and NS Display use the same data format for date and time. 1. First I allocated memory to share in the PLC (Using CX Programmer) The shared SYSTEM MEMORY will be the DM2000 area (suited for my purposes). (Refer Appendices 3 of NS Series -V1 Programming Manual V073-E1-06 for available data areas.) 2. Secondly set up System Memory Mapping on NS Display Although I wanted to share the word memory (not worried about the bit memory) I did have to allocate both word and bit memories to the DM memory of my PLC. If not an error would occur in CX Designer To set the memory area in the NS Display (Using CX Designer) I used the following tabs System Settings> Initial> System Memory $SB Allocation [PLC NAME]:DM02090 $SW Allocation [PLC_NAME]:DM02100 3. Thirdly select words to share between on NS Display (Using CX Designer) To set the data to be mapped to the memory area in the NS Display System Settings> Initial> System Memory List> Next Page> Next Page> Tick to Select Time&Date (I use BCD) 4. I then downloaded all the settings to the NS screen. (Using CX Designer) 5. With the PLC online I could see the time information via CX-Programmer watchwindow looking at DM 2113 and subsequent addresses 6. I placed a move statement in the PLC to write to the shared SYSTEM MEMORY. MOV A351 D2113 ( supposed to be move PLC clock to shared SYSTEM MEMORY) The same goes with the rest of the date and time 7. The PLC is currently moving the PLC clock to the shared SYSTEM MEMORY but the NS display then writes over the data. I believe the NS clock can only be read remotely and not written. Thanks again Bits n Bytes i changed my previous post to reflect the latest release I am downloading Version 6 now and with a slow connection on site the 19meg pdf may take a little time, cheers again
  9. NS Screen - Updating Date & Time via PLC

    Sorry Members I may have found my answer in the endless resource of omron manuals A better look over the literature uncovered Section 2-4 of the NS Programming Manual (V073-E1-05.pdf) I will investigate and post the outcome
  10. Multiple BMP Triggered by Multiple Bits

    Hello All, I am programming with a CJ1M and a NS-10-V1 HMI screen and have relatively new versions of CX programmer and CX designer (1.00). Basically I have four bitmaps which i want to trigger depending on the status of the follwing bits; CB_Closed CB_Open Isolator_Closed Earth_Switch_Closed So an example scenario earth switch open, isolator closed, cb closed then show a bitmap of the single line energised. another one might be earth switch open, isolator closed, cb open so show the feeder unenergised but with the isolator closed Ideally i would want a bit lamp with multiple bitmaps and the combination of digital bits corrosponds to the bitmap displayed. I am after a function like in the panelviews multistate indicator can someone keep me up to date? However from an earlier post i believe this has to be done by overlaying bit lamps. If this is the case so be it, and i will do something tricky plus put in the request for the next version cheers
  11. Multiple BMP Triggered by Multiple Bits

    Thanks Chris, That is exactly what i was after in this application. Secondly in a few other applications i will go to word level with and display using a word lamp so that i can show several states of an object. thanks again
  12. free HMI bitmap or jpeg

    I am fairly new to bitmap design but have done work using MSpaint for scada and a panelview and found this frustrating. Namely when you wanted to match colours, using the correct pixel rectangle etc. I am now using GIMP and will not look back. i am using a windows installer version but after a day i am now counting the time i have saved. It has a bucket of features which i do not care of at the moment but either way it is ideal for this type of work highly recommended
  13. SCU Communications Card

    Hello All, I am currently utilising both serial ports of a SCU41-VI for two separate 2 wire , 485 , Modbus networks. Q1. I noted that Sleepy and BobB both recommend the Adam 4520, consequently I have one in stock. I wanted to know what cable was used between the SCU RS232 port and the ADAM 4520. Straight through with a gender changer? Q2. As stated I have two independent modbus networks with 8 modbus nodes on each network. Am i right in believeing that two networks will yield a faster response compared to one network with 16 nodes? The real question is probably that the RS485 Port can execute a read request concurrently with the RS232 port executing a read request ( too different nodes on different networks). I believe yes because the two PCMR instructions are using a different logical port in the read requests. therefore i could be accessing twice as much information on a 2 x 8 node network when compared to a 1 x 16 node network. thanks in advance
  14. SCU Communications Card

    Working thanks sleepy and just to confirm i think you meant PLC to ADAM Pin Connections of Male to Male - 9 Pin D shell PLC to RS232 / 485 converter 2 to 3 3 to 2 9 to 5 7 to 4&6 bridge
  15. SCU Communications Card

    Thanks sleepy working fine where did you find this info i looked over the omron manuals but perhaps not deep enough! you may have meant PLC to ADAM too ... May have jumped the gun a bit early in the race. I don't think i have the pin outs correct but I am getting both the send and recieve pulsing which is an improvement. I will check my work in the morning Was this wiring info in the manuals? if so could you direct me to the appropriate one? i was thinking Section 3 of the CJ1W-SCU21/SCU41 Serial Communication Unit Operation Manual W336-E1-06
  16. SCU Communications Card

    Thanks Sleepy will investigate
  17. Hello All, I have a controllogix PLC (L35E) using the ModbusMaster.acd file supplied with RSLogix5000 version 13. I have a Modbus network working on a RS232 network. The RS232 port of the compactlogix is connected through a DB9 crossover cable to my laptop with a modbus simulator (modbusview). I am simulating the PC as slave node. the PLC Master polls the PC slave and retrieves data from registers 0-100. This works fine. However in my application i wish to poll a device with address 2001. I am unable to do this because the following tags for registers 03 and 04 of the Controller Tags is limited to 250 words. Mod_Data_InpReg3 Type: INT[250] Mod_DataHoldReg4 Type: INT[250] QUESTION : when i try to read an address above 249 (03 or 04) the statement is not sent . I can see the statement is not sent because the PLC comms light stops flashing. When i change the address to 247 however it polls correctly and it retrieves data from my PC slave node. So to summaries I cannot poll data from a slave node above 248. Has anyone encountered this problem? Is this a limitation? I believe it may have something to do with setting the array larger than 2500 so that the data at address 2001 can be stored?
  18. CJ1M High Speed Counter

    Hello All, I am writing to ask the voltage input specifications of a high speed counter on the omron CJ1M CPU23. I had looked at the manual provided and it mentions a 24v for the inputs (but i believe this may be for general purpose inputs). If you could direct me to the specification (I have alot of documentation) Basically i have an ENGINE MPU >>>>> SIGNAL CONDITIONER >>>>>> CJ1M CPU23 The signal conditioner oututs 2.5vpp 5kHz square wave. The CJ1MCPU23 operates correctly with a program i have. I want to keep within specs of the OMRON as this is a design job. Therefore i need to know that this input voltage is ok, OR will i have to aplify the output of the signal conditioner.
  19. CJ1M High Speed Counter

    Hello Again, I have just received a Magnetic Pickup Unit (MPU) interface that will connect between my CJ1M CPU23 PLC and a generator. ----------------------------------------------- To clarify what had occurred in this post a summary is as follows. I had connected the MPU interface to a CJ1M CPU23. Not only had i wired this incorrectly but i also had a MPU interface that could not be used for the intended application, thanks Jay. Basically the input to the MPU interface is an MPU. The MPU itself outputs a complete sinewave cycle every time an engine flywheel tooth passes it. This sinewave is transmitted to a device I will call the MPU interface. The MPU interface takes this sinewave as input and outputs a square wave for the PLC. The PLC will count the frequency of the squarewave using PRV(881) and i can determine engine speed. ----------------------------------------------------------- So after sending a few data sheets to an electronics guru he has supplied me with a custom MPU interface. He said he used the line driver chip for cost and simplicity. I had previously expected a 24v dc peak to peak square wave. The electronics guy supplied a much cheaper line driver circuit. I plan to use the line driver inputs on the CJ1M CPU23. I will connect the ground to pin 29 (LD-) and the squarewave signal to pin 27(LD+). I will leave pin 25 unconnected. Now if I use the command PRV(881) I can see the frequency on high speed counter 1 without a problem. NOW THE QUESTION.............................. Looking at the attached PDF I see that the only wiring including the Line Driver is on page 7 of 31. This shows connections to IN9 and IN3 of the CJ1M CPU23. Should I leave these inputs unused? Could I still use the PRV(881) command and count frequency? Thanks in advance. OMRON_CJ1M_CPU23_Wiring_Chapter.pdf
  20. CJ1M Slave on Existing Modbus Network

    Brisbane for me Nibroc, I am holidaying myself on Thursday for a couple of weeks! Thailand through Cambodia and then to the base of Vietnam, then 6 days spare to get to the top. Haven’t seen much outside Australia but mum was born at mount maunganui near tauranga where I have spent a few summers. So there was a panic to progress with aspects of the programming in particular knowing the communications link is possible and capable (hence the weekend work!). This project was won after I had planned the holiday and the boss gave me a good deal more responsibility but incidentally a holiday during a busy time of the project. Not to worry though. Thanks for the terms of use, this leads me to believe that a “unreliable but mostly unpredictable coding” should have been my username. Thanks again guys i am sure you will see my name here in two weeks!
  21. CJ1M Slave on Existing Modbus Network

    OK although this code will not assist those that have helped me i am sure others can find use for it. The attached code is for a CJ1M CPU23 and a SCU41 communications unit ( it may apply to other configs but i am unsure) I have serial port 1 connected to two power meters. These power meters are seen as 2 slaves and the PLC is the master. I also have serial port 2 connected to an existing modbus network (one i do not know alot about as yet). The PLC is a slave and the master is an existing SCADA PC. I could run thorugh all the hassles and troubleshooting performed but this is probably best left to this thread and a previous thread > CJ1M & SCU41 - Modbus 2 Slaves, Ladder Program Polling with PCMR(260) http://forums.mrplc.com/index.php?showtopic=4649 Thanks again to Nibroc, Jay Anthony, BobB & Sleepy wombat for their support on these two threads. Also if this is the final version (or something simlilar to this) is permission granted from sleepy wombat in using the Modbus code & protocol and Nibrocs code for passing the token? no responsibilites on your behalf for any bad coding or uneducated applications by myself!!
  22. CJ1M Slave on Existing Modbus Network

    A Communication Success !! Serial Port 1 the master is polling the two power meters and storing these process variables in data memory. Serial Port 2 is the slave and is being polled by the Desktop PC. The slave is communicating to the Desktop PC and communicating the process variables that are then displayed using a modbus emulator on the Desktop PC! Many thanks Nibroc for pursuing this thread and for each solution you have provided. The last solution being that the RS232 comms cable. We have a dummy setup with two RS232 connectors wired to terminals on a single board. I wired these up as specified and instant communications!! Conquered!! Sleepy i think you were right on the timing issue so in bold ATTEMPTING TO CREATE A MODBUS NETWORK WITH SERIAL PORT 1 AS A MODBUS MASTER AND HAVING SERIAL PORT 2 AS A MODBUS SLAVE ON THE SAME NETWORK WAS NOT SUCCESFUL Ok so i clean up my code a bit and post the results because this is Nibroc as editor and me as a writer.
  23. CJ1M Slave on Existing Modbus Network

    That has cleared things up Nibroc, As you mentioned the PC does not supply the voltage to the CJ1W-CIF11 converter and this would have been the reason why the program was polling serial port two but i was not seeing the recieve light flashing on the SCU41. The first reason was that i thought the small DIP switches on the unit was a surface mounted IC with a viewing window. How neat i thought. After closer inspection i saw the switches ( 30min later at least) and disciplined myself accordingly. I will get a temporary cable based on the pdf you supplied. I recieved the software Cx - one on tuesday and did not search through the supplied programs i will however look at Omron Multiway. Thanks again guys much appreciated it would have taken months to get where i am now without hte support and knowledge shared here. I will update tommorow when i return to my long weekend holiday batch.
  24. CJ1M Slave on Existing Modbus Network

    Thanks Sleepy, I have tried this program because you had suggested it another post. I did a little testing before with no send reveive lights on the SCU41 i thought i would simply connect the serial port 2 (slave) to my existing master network (serial port 1) I think my problem is the comms cable. Do you use a standard rs232 straight through cable. ( I use the peripheral port for programming.) If not I have two omron CJ1W-CIF11 rs232 to 485/422 converters I had connected these via two wire SCU41 serial port 2 | CIF11 RDA- , RDB+ | | | | two wire | | | SDA-, SDB+ CIF11 | RS232 gender changer | | PC I only attempted before i tried connecting it to the master network and when i saw the lights flashing for port 2 on the SCU41 card i rejoiced and headed down that path. Thanks sleepy i will atttempt this tommorow at work and trouble shoot the PC to SCU41 further for success
  25. CJ1M Slave on Existing Modbus Network

    I downloaded the latest ModbusV5 and transferred to the PLC ensuring my communication settings on both ports were identical (8 bits , No parity, 1 stop) the only difference is maximum length (200 versus 1000) the protocol is also attached. I can communicate so again I have ruled this out. The only thing left is my ladder which as Nibroc showed is fairly poor at this stage. Adapted___ModbusPM_v5______12_6_2005.psw