Search the Community

Showing results for tags 'c# easymodbus wincc double data type'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Found 151 results

  1. Hi All, I need to start PLC Data Logging using an SD card in the CPU module for an iQ-R PLC.  I have not attempted this kind of logging before and I was wondering about any restrictions on the type of SD cards that can be used. The documentation I have found says "SD/SDHC memory card: 32Gb maximum". Does anyone know why can't I use a 64 GB SD card ? (maybe due to addressing limitations?) Also, when I look for SD cards, I see different speeds of data transfer such as 120 MB/s or 100 MB/s and I was wondering if there is any difference as far as the logging is concerned.  Does anyone know if there are any other restrictions, brands that don't work? Useful tips? Cheers    
  2. I am working on resolving issue in Press Machine where previous engineer has developed logic as per attached file. the atatched screen of HMI can only access by Engineer and only Engineer can set value of SPM (Stroke per minute). Once switch is set on the SPM of any job can not go beyond set value. The issue I am facing it when we power cycle, the switch get off and the register D2842 get SPM back to normal (set as per the die data) not by eng. How I can hold that data after Cycle power?  
  3. Emerson (GE) memory map data types

     I've always had this Allen-Bradley memory map taped on my wall in my office. It used to be handy to use, until I remembered al of the prefix letters for each data type. Now I am using Emerson (GE) the old proficy software now called PAC ME machine edition. Now I'm finding it's about impossible to find the data type list amongst the thousands of help files, videos, ect... it seems like a simple thing to find, but I'm not having any luck. They use I and Q for regular inputs & Outputs, but there are R files, M files, S files, N files, G files, ect.... this is old-school PLC software that doesn't use tag names.   Is there a steadfast rule for each type, or can they be used for any type of data? Dazed and confused...  
  4. Hi All, I need access to a the Safety function blocks within a safety CPU using sysmac studio on a machine we are upgrading.. Is there a generic password available to gain access? Best Regards, Paul  
  5. Dear reader, I am writing a C# program using the library  ‘EasyModbus’ that needs to communicate with Siemens WinCC via the connection type ‘Modicon modbus’ I have written a version using the ‘float’ data type in WinCC and that works perfectly. Here my code fragment: Method to convert ‘double’ to bytes in C#: public static byte[] DoubleToModbusFloat(double value) {     byte[] bytes = new byte[4];     float floatValue = (float)value;     int intValue = BitConverter.ToInt32(BitConverter.GetBytes(floatValue), 0);     bytes[0] = (byte)(intValue >> 24);     bytes[1] = (byte)(intValue >> 16);     bytes[2] = (byte)(intValue >> 8);     bytes[3] = (byte)intValue;     return bytes; } Call of the method and loading of the modbus registers in EasyModbus: Bytes = PublicCode.DoubleToModbusFloat(TmpDbl); int n = (int)ModbusStartAddress + ((i - 1) * 2); mb.ModServer.holdingRegisters[n + 1] = (short)((Bytes[0] << 8) + Bytes[1]); mb.ModServer.holdingRegisters[n + 2] = (short)((Bytes[2] << 8) + Bytes[3]); So far so good – this works fine. But I also want to be able to use the ‘Double’ data type in WinCC because I sometimes need more precision than the 7 figures of the ‘float’. I thought it would simply be a case of doubling up the code so I wrote: Method to convert ‘double’ to bytes in C#: public static byte[] DoubleToModbusDouble(double value) {     byte[] bytes = new byte[8];     long intValue = BitConverter.ToInt64(BitConverter.GetBytes(value), 0);     bytes[0] = (byte)((intValue >> 56) & 0xff);     bytes[1] = (byte)((intValue >> 48) & 0xff);     bytes[2] = (byte)((intValue >> 40) & 0xff);     bytes[3] = (byte)((intValue >> 32) & 0xff);     bytes[4] = (byte)((intValue >> 24) & 0xff);     bytes[5] = (byte)((intValue >> 16) & 0xff);     bytes[6] = (byte)((intValue >> 8) & 0xff);     bytes[7] = (byte)(intValue & 0xff);     return bytes; } Call of method and loading of the modbus registers in EasyModbus: Bytes = PublicCode.DoubleToModbusDouble(TmpDbl); int n = (int)ModbusStartAddress + ((i - 1) * 4); mb.ModServer.holdingRegisters[n + 1] = (short)((Bytes[0] << 8) + Bytes[1]); mb.ModServer.holdingRegisters[n + 2] = (short)((Bytes[2] << 8) + Bytes[3]); mb.ModServer.holdingRegisters[n + 3] = (short)((Bytes[4] << 8) + Bytes[5]); mb.ModServer.holdingRegisters[n + 4] = (short)((Bytes[6] << 8) + Bytes[7]); However, this code does not work correctly. I have tried all combinations of byte and word reversal, and whatever I do WinCC either displays nonsensical values or ‘####’ showing that it cannot display the value. I have tried reading as much documentation as I can but it still looks to me as if I am doing the right thing. Also, I have downloaded a number of ‘modbus master’ code examples, and they seem to be able to read the ‘Double’ from my program without any issues. In WinCC I also see that there are two types of double – ‘Double’ and ‘+/- Double’ – I am also unsure as to why this is – there is no ‘+/- Float’ data type, which seems inconsistent to me. I am obviously missing something, but cannot seem to discover what exactly. I hope that someone can point me in the right direction as to what I am doing wrong. Please see attached word file for a picture of the configuration of the connection in WinCC.   Thanks in advance for any help !, Dave Long Double trouble.docx
  6. TIA Portal for beginners

    If you learn more quickly after watching videos about PLC like reading the literature without example, then these videos can help you if you are a complete beginner. Enjoy it  (If this is against the rules of this site then sorry for spam  )   PLC:   1. How to create project in TIA Portal   https://www.youtube.com/playlist?list=PLqYtPgi-xbbgUBs7nrNmq5ManYyQ-hvKK       2. Program blocks   https://www.youtube.com/playlist?list=PLqYtPgi-xbbhlni7Uw9-lfs8UIykpuubF       3. Bit logic operations   https://www.youtube.com/playlist?list=PLqYtPgi-xbbitdaKvFJv9WZEOj7VrMf_0       4. Timer operations   https://www.youtube.com/playlist?list=PLqYtPgi-xbbiaWQL8lXja1_Kd1z-jeDXr       5. Counter operations   https://www.youtube.com/playlist?list=PLqYtPgi-xbbgfyg2dwDiR7xzsaXtdI9xo       6. Comparator operations   https://www.youtube.com/playlist?list=PLqYtPgi-xbbgs-WgOvePyRUKgnDBK-qfx       7. Math operations   https://www.youtube.com/playlist?list=PLqYtPgi-xbbgInRxxraaX6RG5LUS8gcpM       8. Move operations   https://www.youtube.com/playlist?list=PLqYtPgi-xbbjQQEXr_bhzjKvNCjBeS1Zw       9. Conversion operations   https://www.youtube.com/playlist?list=PLqYtPgi-xbbjsjfMUtVn3QQ6MJM7cBpTW       10. Program control operations   https://www.youtube.com/playlist?list=PLqYtPgi-xbbgFtnxDkNZ7Amps67nr-KHX       11. Word logic operations   https://www.youtube.com/playlist?list=PLqYtPgi-xbbh6bGa9bgy6cJhVi-RhF0gH       12. Shift and rotate instructions   https://www.youtube.com/playlist?list=PLqYtPgi-xbbhlUnK9ECCKUccqt91Qsw6e   HMI:   1.       Beginning with HMI devices   https://youtu.be/EF4Qprf0Mn8   2.       Basic work with screens   https://www.youtube.com/playlist?list=PLqYtPgi-xbbgPAApJCAGcPZOHViTAT9C1   3.       Basic screen objects           4.    Elements objects   https://www.youtube.com/playlist?list=PLqYtPgi-xbbgOSznFb03Rr_St-2WFcygo         5.       HMI Alarms   https://www.youtube.com/playlist?list=PLqYtPgi-xbbi_V7XENgupV7HFjOJI7Yes   6.       User administration   https://www.youtube.com/playlist?list=PLqYtPgi-xbbgDP9dfAOkW3eodC5aH0kmR         7.       Scheduled tasks   https://www.youtube.com/playlist?list=PLqYtPgi-xbbjsaMlovHL2BDrju8kKgkZi     OTHER: Siemens PLC - Hardware configuration (SIMATIC S7-300) https://youtu.be/WVkAGKsxftw     Siemens HMI/PLC - communication (Basic Example) https://youtu.be/AcN50TShHgY   Siemens PLC - Firmware upgrade/downgrade via TIA Portal https://youtu.be/qEsS7RR7QIw   Siemens HMI/PLC - Recipes (Basic Example 1/2) https://youtu.be/wLmH-QT3T9U   Siemens HMI/PLC - Recipes (Basic Example 2/2) https://youtu.be/_2K6l7dYuqY   Siemens PLC - Upload program from PLC to TIA portal (PC) https://youtu.be/igw-4CxjnLw   Siemens PLC - Add and install GSD file in TIA Portal https://youtu.be/LJKUzv3Zykw   Siemens PLC - Activate and work with Web Server in TIA Portal (Part 1/2) https://youtu.be/WCpiej4S8-U   Siemens PLC - Activate and work with Web Server in TIA Portal (Part 2/2) https://youtu.be/xl4pxLK0CDY   Siemens PLC - Scaling/Converting Analog Input/Output (0-20mA to 4-20mA and vice versa) https://youtu.be/BOjFlhAwO0k   Siemens HMI/PLC - Linear scaling of HMI Tag (PLC/HMI tag scaling) https://youtu.be/XBUknb3JDfE   Siemens HMI - Changing of Date/Time format (12/24 hours format) https://youtu.be/bCVKFrLwzWA   Siemens PLC - Configuring and commissioning of SIRIUS ACT (PROFINET IO) https://youtu.be/yIW6kta34_s   and more...      
  7. Hello,           I have installed Simatic S7 5.6 and WinCC Flexible 2008 Runtime SP5 on a Windows 7 computer.  Running Simatic Manager brings up the error message 'Simatic WinCC flexible  -  Older version or not fully installed'            as far as I know, WinCC 2008 is compatible with S7 5.6 and I have installed both fully.  Does anyone have any ideas on how to get this running? Thanks, Rath
  8. Hello,           I have installed Simatic S7 5.6 and WinCC Flexible 2008 Runtime SP5 on a Windows 7 computer.  Running Simatic Manager brings up the error message 'Simatic WinCC flexible  -  Older version or not fully installed'            as far as I know, WinCC 2008 is compatible with S7 5.6 and I have installed both fully.  Does anyone have any ideas on how to get this running? Thanks, Rath
  9. Data register over flow

    Hi, data registers are getting full, because of extremely high speed pulsing is there any way , if the data value in register goes above the capacity of 32 bit register, it automatically attaches itself to next set of data registers so lets say if data was written in D10,D11 Upon reaching the limit, it goes to D10, D11, D12, D13 please share if there is an alternate way to do this
  10. Data register over flow

    Hi, data registers are getting full, because of extremely high speed pulsing is there any way , if the data value in register goes above the capacity of 32 bit register, it automatically attaches itself to next set of data registers so lets say if data was written in D10,D11 Upon reaching the limit, it goes to D10, D11, D12, D13 please share if there is an alternate way to do this
  11. Hi, I'm Jovel, I'm new to learning how to program PLC. Just want to learn how to use Omron Sysmac Studio . I have a question about the Data Type Data Type - Structure ( Offset Type - Offset Byte )  / Union   I Don't Understand this 2 Data types and how going to use them, can anyone teach me and have a sample program? Thank you
  12. 1746-NT8

    Hi All, I have a 1746-NT8 and am using a type K thermocouple. The module is configured properly and the cjc's on on the terminal block. All channel lights flash until a thermocouple is no longer seen as an open. When inputting -328 degrees farenheight the light goes solid green for that channel and the input table reads -29,453 and when you go to +2498 degrees farenheight it flashes Green for that channel which seems like over temp. When I back it off to 2488 it goes solid green again and the input table reads 32,757. Is this normal, or should you be able to go the whole range from -328 to +2498 degrees farenheight and the status light should stay solid? The manual says type k thermocouple should go from -428 to 2498 farenheight, bit when you google type k thermocouple range it says the range is -328 to 2300 degrees farenheight.  Thank you
  13. Export/Import PDL WinCC

    Hi all, Do you know a way to export/import the graphics screens (PDL) from a human understandable language (XML, CSV, JSON, etc)?? Thanks!
  14. Hi there,  I'm downscaling my business in Western Canada and have some legit software licenses I'm going to sell. This was my first thought as to where I might explore selling/transferring licenses, but I'm also open to polite suggestions.  I have: one Studio 5000 Full Edition ESD Software (9324-RLD600ENE) (software & valid license) two Siemens TIA portal software packages & licenses with Step7 v14sp1 and WinCC Comfort Advanced V14sp1 (software & USB dongles) an unused Simatic WinCC SmartServer license (software & USB dongle) one Progea Movicon 11 Scada/HMI developer license (software & USB dongle) one Progea Movicon NExT DEV3-FL (developer license) (software & USB dongle) an unused Progea Movicon NExT Scada license (RTCS3-F-1K+WB3-1K) for site install (software & USB *unused) one package of Schneider Movicon with license (Vijeo Designer, Unity Pro S, and SoMachine) (software & USB keys) Thanks! Mark
  15. Hi All I am trying to connect Cognex OPC Server with Mircrosoft SQL Server (SMSS). Do you have any idea how to do that? I couldn't find relevant information online.
  16. WinCC WWTP Example Screenshots

    Hello everyone. I work with PLC's and SCADA for many years developing industrial applications. Now, for the first time, I have to develop a control system with Siemens PLC's and WinCC for a WWTP. Can some one share WinCC screenshost of simillar applications just to get an idea on what and how put things on screen. Thank's in advance.
  17. I have an old Panelview 800 in a system that consists of the PV, a Micro 850 and 10 Powerflex VFd's running conveyor motors. My problems started when one of the motors would not run. It seemed that the PLC was not sending the Run command or the Speed. The problem got worse as I was working on it when two others did the same thing. The current situation is that 8 of the VFD's are getting a Run command and 2 are getting a flickering command. All 10 are getting a 0.0Hz speed command. I connected to the equipment with my laptop and looked at the PLC program and the PV program. I found that in the PV program that all of the user input data, which consists of Motor Speed (Hz), Accel and Decel times and some other timer values for the timing of some conveyor starts and stops, where all gone, set at '0'. this equipment is several years old and predates my presence here. The PLC program seems to be running and passing the commands that it receives to the VFD's. The data is passed to the PLC via Global Variables. I've never encountered this particular problem before. Any ideas?
  18. Hi, I have a problem with Omron PLC and Beckhoff IO. The IO just disconnects in a few minutes and comes back! I received different errors: Link off error, Illegal slave disconnection, process data reception timeout. When I also check "Display Diagnosis/Statistics information" I see errors on all ports A and B of all nodes.  I have called and talked to both Beckhoff and Omron.  I have two NX1 and one NJ101 to test. And I have three EP2318-0001. I have the same problem with all the PLCs and EP boxes. It does not matter if I have one, two, or three nodes. I have tried different revisions of the EP2xxx from the XML file, different settings for the slave, different task periods, and the error still is persisting.
  19. Currently have NX PLC setup as an OPC UA server and an OPC client setup and communicating.  The issue is only tags that do not have a Data Type are showing up in the OPC client.  I have 2 separate OPC softwares connected to this plc through OPC UA and both are having same issue.  If I setup the OPC as a polling service, then all the tags show up as expected.  Does anyone know if this is a known issue with Omron and their OPC UA server, or is there something that I am doing incorrectly (possibly a setting within Omron that I am not aware of)?
  20. NE1A-SCUP02-EIP

    Does anyone have experience with the NE1A-SCUP02-EIP safety PLC? We had a machine shutdown yesterday with a L9n4 error on the NE1A unit. The manual says this is a tag data link error. Does this cause the safety PLC itself to shutdown? I always thought the EIP portion of the safety PLC was only used for status reporting to the PLC. The safety portion is strictly on DeviceNet and is independent of the EIP network.  The CJ2 PLC's error log tells me it had problems communicating with the safety PLC, the VFD, and NX I/O's which were all in the same panel going through an Ethernet switch. 
  21. Siemens PCS7 v9.1

    We need to upgrade Siemens PCS7 V8.1 to PCS7 V9.1. Can we able to do so without upgrading the windows of the EWS/OWS. If Yes then How we can do it and If no then what is the replacement? Please answer that question with best of your experience. Thanks in advance. 
  22. Hi, I have quite a noobie question. I want to create a function block to do some simple operations on 2 variables. Both variables are In/Outs (see picture attached). How can I make this function accept variables regardless of the data type? Given these is just simple math I am able to use the same instructions in REAL, INT, UINT, etc. But, the function block only lets me assign one Data Type to the In/Out variables.
  23. Data Historian

    Hello, What would be the best data logger for Backhoff automation based automation? Idea is to record some analog and digital tags at certain time intervals. Present them in tabular as well as graphical form and print some reports based on selected time window. I have looked up TwinCAT Analytics and that seems to be one option. But want to check others before making decision.
  24. Hi gents, I need to build up a communication between nx1p2 to another omron plc (any type with sql support). This is due to the fact that I have finaly to prepare the plc communication with the sql database, and nx1p2 doesnt support this.  Sorry, i know it's probably a noob question, but I'm a beginner. What type of technology i shoud use to make this connection between NX1P2 and another Omron PLC? Or might be some share some project?  
  25. Hey guys,   I know this is a topic that has been discussed before, but I am having trouble finding exactly what I am looking for.. I want to know the most efficient way to record data from my PLC to an Excel file on my PC. I want this to be done without the use of the PLC's webserver.  Specifically I am trying to record vfd speed every 10seconds with a time and date stamp. How can I do this?   Thanks, James