chombium

MrPLC Member
  • Content count

    16
  • Joined

  • Last visited

Community Reputation

0 Neutral

About chombium

  • Rank
    Sparky

Contact Methods

  • Website URL http://
  • ICQ 212949293

Profile Information

  • Location Skopje
  • Country Macedonia
  1. SCU41 RS232 port configuration

    Hi, I need to configure SCU41 RS232 port (Port2) to 9600,8,N,1 How can I do that? I've read in SCU Operation Manual that can be done by writing some value at particular locations. Tryed that and it seems it's not working. The Unit number is 4 so I wrote 860C (config for 9600,8,N,1) at location D30410 Is that right Is there some config dialog in CX-Programmer to do that? Somewhere in the PLC Settings dialog maybe? I think that the configuration is the problem, checked the wiring and the program, I use PMCR to send data, I see that the PLC is sending data but there is no response from the other device. Could it be some RX Buffer problem at the PLC I've attached the code, as well. Every second data is requested from the external device, it is just ateset program with one PMCR command. TIA, chombium TEST_READER_RS232.cxp
  2. CJ1M + SCU41

    I didn't know that I should change that too. A guess you and Jay saved my life again. Thanks a million Should I change the logical port too? GREETZ, chombium
  3. CJ1M + SCU41

    Hi Sleepy, My program is a copy of your modbus protocol macro server example The messages I'm sending are defined in the memory starting from D100 I first check if the SCU is ready for sending, then I calculate the starting address of the message, and I send the message using PMCR with index addressing. Everything about sending to the port is a modified copy of your example code I use SCU41's PORT1 (RS485 port) I think there isn't any problem with the program. If I define the SCU41 with Unit No 0 and set the status bits and communication parameters in D aria then it works perect. If I change the Unit No. to somethinhg else it's not working. In the first case Unit No 0: I define 860A in D30000 (9600,8,N,2) and CIO1500 as status and if Unit No 4: 860A in D30400 and CIO 1700 I get no IO Table error in both cases. Everything seems to be configured correctly. Here is the complete code where SCU is defined as Unit No. 0 Hope iit will make the picture clearer GREETZ, chombium driver.cxp
  4. CJ1M + SCU41

    Yes I did, elsewise I would've get an IO error. I just wanted to switch the Unit No to 4. I changed the rotary swithch on the device to 4. Then corrected the IO Table, and reprogrammed the PLC. I know that DM30000 doesn't hold Unit No, I just wanted to say that I configured the serial port (9600,8,N,2) as it was configured when the device had Unit No. 0 The result I got was: No IO Table error, but no communication as well. It's really weird. I did everything by the book
  5. CJ1M + SCU41

    Because I have only one external Unit attached, Is there any logic that "blocks" the bigger Unit No. ? Guess not
  6. CJ1M + SCU41

    Hi, I have CJ1M and SCU41 connected to it. I've developed a program that uses the SCU41. The SCU was addressed as Unit No. 0. Now I want to change the Unit No. from 0 to something else. To configure the SCU port's settings I've use the description in SCU Operation manual. It says that the configuration fot the port is at D30000 + 100 x Unit number When I try to change the Unit No. I change the config word location acording to that equation above. I'm using the same value to configure the port as when it was Unit No. 0 The thing is that the SCU doesn't send any data I don't get IO Table error. GREETZ, chombium
  7. Floating point aritmetics

    That option didn't cross my mind The thing is that I need to read the value from the PLC using SCADA system created in Wonderware. The thing that you suggest seems quite resonable: I'll have the integer and the decimal part in two words so I could add the decimal point between those two values when presenting on the SCADA screen Thanks, Jay chombium
  8. Floating point aritmetics

    Hi, I read a measurement from a device via serial port, and I get the value as a 32bit unsigned binary number: bits 31...24 Decade exponent (signed 8 bit) bits 23...00 Binary unsigned value (24 bit) Example: 123456*10E-3 is stored as FD01 E240 (hex) So I have to convert the 32bit unsigned value to float To do this I plan to implement the folowing algorithm: 1. Extract the exponent value from the 32bit (bits 31..24) Extracted exponent would be stored as 32bit signed value 2. Convert the exponent to float using FLTL(453) instruction. It converts 32bit value to float. 3. 10 Power Exponent with PWR(840) instruction 4. Extract the base from the 32bit (bits 23..00) 5. Convert the Base to Float using FLTL(453) instruction 6. Multiply the Base with the value calculated in step 3, using *F(456) instruction I have to do the same conversion with a 32 bit signed value. The Value format is the ame as above. Is there any shorer/easier/more elegant solution? Thanks in advance chombium
  9. CJ1M Modbus RTU

    Thanks, once again Jay A Guess I'll have to put some more effort to make the program. I Assume that the protocol for downloading/uploading macros to the SCU is some of the stadard protocols. Is it? GREETZ, Jovan
  10. CJ1M Modbus RTU

    Hi again, At first I want to say that the leds on the SCU are finally flashing I forgot the other problem that I have I need the pin out of the ports of SCU41. That would probably be in the SCU41 manual which I couldn't find on the web nor in the download section. Because of the problems with macros that I had, I'm planning to write a protocol downloader, but which supports the CX-Protocol file format. Therefore I need some docs on CX-Protrocol file format. Are there any? GREETZ, Jovan
  11. CJ1M Modbus RTU

    Sleepy, Jay You were very helpful. Thank you very much. The thing I was confused by, was the possibility of having both master and slave routines in the same SCU, and the equality of the function numbers. I usualy write master or slave not both in the same device. Guees I have to read the manual more carefuly Once again: Thanks a million, I'll probably catch my deadline GREETZ, Jovan
  12. CQM and VIsual Basic

    Yeah, guys you're right. I thought about that option too. Writting the protocol yourself. The thing is that I've done that few times and sometimes it wasn't very plesent experience. Solving the problem with DDE or OPC driver is more elegant and more efficient solution 'cos you can access the PLC data from more than one program simultaneously. It's always good when you have choice and you can pick the solution that suits your needs. Jovan
  13. CQM and VIsual Basic

    The things you need are: CX Server DDE Manager or CX Server OPC They will be the interface between your VB program and the PLC. You'll have to define some data points (PLC memory locations) which you'll access (read/write) with your VB program. After that you can access them with some ActiveX or DDE controls in VB. There are some examples of configuring and using these tools in the download section GREETZ, Jovan
  14. CJ1M Modbus RTU

    Hi, QUOTE Try this link i have never used it.... Protocol downloader.... I was thinking that program would do the job, I've downloaded yesterday, but the problem is the one that Jay mentioned. I tried to open the .psw file but the program asked for .pmr file It doesn't support the CX-Protocol file format Sleepy, can you do what Jay suggests? I need only the master macro. It would be nice if you divide it in two separate files. One for the master and one for the slave Is there any freely available demo/trail of CX-Protocol? Another thing that I want to ask about the macro are the IDs of the master/slave macros: Since the slave and master routines have the same function numbers if I download whole .psw file (both master and slave) how would I know which macro will be called. For example: if the second control word is 04 (read holding register) how would I know which macro will be called? master or slave? I've noticed an error in the manual that comes with the Sleepy's modbus protocol macro. In the manual the order of the CRC16 bytes are Hi Lo, but in the modicons modbus specifications are CRC(Lo) CRC(Hi). What about the macro?? GREETZ, Jovan
  15. CJ1M Modbus RTU

    I have to read some transducers which have modbus RTU RS485 communication. I basically need only modbus fuction no. 4 I've tried writting that function using TXD and RXD but they were converting all the data I was sending to ascii. Some code for CX-Programmer on doing that communication would be a very helpful. The next step was to try PMCR which as I see works only if I program the PMSU with some macros. Sleepy Wombat sorry for writing wrong your nick GREETZ, Jovan