Jump to content

Nathan_MerlinIC

Members
  • Posts

    10
  • Joined

  • Last visited

Posts posted by Nathan_MerlinIC

  1. I found my wires were switched.  Apparently Omron calls out A- B+ and my adapter uses A+ B- and I wired it using the letters instead of the +/-.

    Using Smithd's advice I went to a simple VISA chain and was able to read the hold register. Seems like the E5CC is using 2-byte mode.  My command was 0103 2000 0001 8FCA and it responded 0103 0200 A4B9 FF, I parsed out 00A4 (164 deg C).  Even though I was able to read the register I got error -1073676294  The number of bytes transferred is equal to the requested input count. More data might be available. I'm not too worried about the error at the moment since I'm so happy just to read the register.  I tried increasing the VISA read byte count from 7 to 8, but it didn't increase the return count of 7.

    I wasn't able to get Porter's API to work even though I think I have the right comm protocol.  I get error 403482 Modbus CRC/LRC error.  The command sent is 01 03 07 D0 00 01 84 87 with a response that is split in two 01 03 00 and 20 F0.  Nothing was displayed in the Registers indicator on the GUI.

    I'm going to start working on trying to write to the controller and set the temperature.  Please let me know if you have any insight into these errors.  Thanks for all your help so far.

  2. Another note in regards to the Comm Spec's.  I re-read the manual and saw if I'm using modbus I need, the communications data length must be 8 bits, and the communications stop bits must be 1 bit by setting the communications parity to Even/Odd or it must be 2 bits by setting the parity to None. I'm running data length 8 bits and stop bit 1 bit with Even parity.  I still get the timeout error during the VISA Read...still tracking it down.

    I also figured out how to see the full Write Command.  I can now see how the Write Command is broken down into 01-Device, 03-Function Code, 07CF- Start Address (ex 1999), 0001- Address Qty, B541 (I still don't quite understand the CRC-16).  

    Any suggestions on how to solve the timeout error would be much appreciated.

    NI IO Trace Modbus Comm 2017-04-18 Write Command.PNG

  3. I agree, according to the manual it uses modbus RTU.  However when I switched over I still get an error from LabVIEW and nothing reported from the register.  I can't decipher the write command line 27 and it look like the data length was changed from 7 bits to 8 (ASCII line 14 vs RTU line 14).  I found in the  data bits parameter and changed it to 7, but there wasn't any change to the results or trace (except that attribute).

    The labview error is a timeout issue so I changed the devices response time to 10 ms from 20 ms, but still get the error.  The serial port configuration timeout is set to 100 ms, but I think the timeout comes from a VISA read in the RX ADU.vi.  I also get an error embedded in the Read Holding Registers "MB Master.lvib:MB_Master_Serial.lvclass:Querry.vi" Error 403483 "Invalid Modbus Session".  That error doesn't get reported at the top level vi, but it obviously sounds important.  Can you tell from the I/O Trace that I have the correct device communication protocol?

    −1073807339 Timeout expired before operation completed.

    NI IO Trace Modbus Comm 2017-04-18 RTU.PNG

    Comm Spec.PNG

  4. I think we're making progress, but I still haven't been able to read the PV (temperature).  I switched to your recommended Porter's implementation.  I attached a screenshot of the block diagram and error that occurs when I run the vi.  I also attached my latest I/O Trace.  I think I'm reading line 28 from the trace correctly.  01-device ID, 03-read function, 07D1-starting address (2001), 0001-quantity of registers to read, 23-CRC-16 not sure what this means though.  I would anticipate a response in a similar format, but I'm not sure how to interpret line 29 and I assume since it is red there is probably an error.  The TX light flashes once when I run the vi.  Any suggestions?  I really appreciate the help.

    NI IO Trace Modbus Comm 2017-04-17.PNG

    Error 1073807339.PNG

  5. Thanks for the response.

    I'm using what I believe is an updated free NI API module https://forums.ni.com/t5/NI-Labs-Toolkits/LabVIEW-Modbus-API/ta-p/3524019  (Link starts to download the Module http://forums.ni.com/ni/attachments/ni/7324/526/6/ni_lib_modbus_library-1.1.5.39.vip). However I tried to get help from the NI forums and got a NI response that they don't support this module..thanks.  They only support the modules that cost money.

    Regardless I tried your advice, but haven't been able to read a hold register.  I think I'm still doing something wrong.  I'm not getting any response from the device including any error.  I attached a screenshot from my simple block diagram and GUI.  I thought maybe I should convert the HEX to DEC considering the API input is an integer type.  I also get the same response if I use "2001" for the starting address and any combination of RTU and ASCII too.  The TX light on my USB to RS485 adapter is also not illuminating.  I thought it would at least flash when I sent the command.

    I'm also trying to contact Omron, but they haven't returned by emails.

    I'm open to trying any other ideas.

     

     

    Modbus VI 2017-04-12.PNG

  6. I'm trying to read (PV process value) and write (SP set point) the temperature on a Omron E5CC temperature controller using LabVIEW, Modbus, RS-485.  I'm new to Modbus and have installed the free LabVIEW modbus library. LabVIEW "Create Serial Slave" seems straight forward, but I'm having issues with "Read Holding Registers".  I'm not sure what to input for "starting address" and "number of inputs".  I attached the E5CC communications manual, I just can't make sense of the addresses and commands and where/ how I use them in the LabVIEW code.  Also is there a easy command or operation I can execute to verify I can communicate with the device and all my protocol settings are correct?

    Thanks

    E5_C_CommunicationsManual_EN_201404_H175-E1-08.pdf

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.