ledbelly2142

Members
  • Content Count

    71
  • Joined

  • Last visited

Community Reputation

0 Neutral

About ledbelly2142

  • Rank
    Member

Contact Methods

  • Website URL
    http://
  • ICQ
    0

Profile Information

  • Gender
    Male
  • Location
    Reno NV
  1. ledbelly2142

    Working With Arrays And Charting

    That did it, thanks!
  2. ledbelly2142

    Working With Arrays And Charting

    I am trying to use display the history of an existing channel with an expression and can't get the syntax correct. I have a channe "mychan" that I want to divide by 4 and show the history with the expression. The General Math Functions and Operations help file indicates that the math.divide() function will work with arrays. Unlike the "Math" function that will not work with arrays. Here is what I have tried in the trend graph expression: math.divide(mychan()/4) math(mychan()/4) and some others with and without the ";" at the end of the expression The channel "mychan" will display it's historical array in the trend graph by itself, just not with any math expression added to it. I can display the instant changing numerical value with a simple expression: mychan()/4, but does not work with historical data points (array). What should the expression syntax be with in order to show a math expression with historical data? Thanks
  3. ledbelly2142

    Modbus Tcp Port 502 Won't Connect

    It sounds like you are trying to connect from to a modbusTCP device outside the network your DAQFactory system is on. It is not clear what you’re doing, but trying to connect modbusTCP through a firewall is likely going to give you problems. ModbusTCP is pretty touchy without trying to tunnel through a network, you will likely get lots of timouts and communications issues between DF and the modbusTCP device. If you want to remotely monitor the device, I highly recommend looking into DAQConnect. I have used it for some time, its very solid. If your remote device need be connected, please check out the DAQBBridge for Modbus. I have not installed a DAQBridge, but its a lot less expensive than installing a remote computer with DF. Check out: https://www.daqconnect.com/daq/company/daqbridge.html I hope this helps. -Greg
  4. It works, I found an error in my typing, missing a ")" in the first line, so the "if" argument was never true. The "testchannelmax" and "testchannelmin" does not have historical data from "tempchannel". Is it possible to plot historical min/max with "tempchannel"?
  5. I must be doing something wrong, my test channels are not adding any values. test channels are device type: Test, I/O type A to D, Timing = 0, no conversions. No errors on the sequence.
  6. ledbelly2142

    Problematic Modbustcp Device

    Thank you, it works.
  7. I like this thread, I would like to do something similar. What if I wanted to get the max and min values for a day (24 hr period) and log it in a test channel? Would it be the following for max if I ran the sequence at 00:00 every day? private mx = max(tempchannel) getTime(max(tempchannel[systime(), systime() - 86400])) testchannelmax.addvalue(mx) or should the mx be a global variable globel mx = max(tempchannel) getTime(max(tempchannel)[systime(), systime()-86400])) testchannelmax.addvalue(mx) Could I make a test channel and put the sequence in the Event of the "tempchannel" channel? How could I look at the min and max values for each day historically with existing "tempchannel" data? I hope I'm making sense. I would like to take an existing temperature channel, and look at (graph) historical min and max for each day, as well as month. Thanks in advance!
  8. ledbelly2142

    Problematic Modbustcp Device

    Does it matter if the channel timing is run by a sequence? If my channel groups are run by sequences, with timing set to "0", will the while statement still work? while(1) if (systime() - channel.time[] > 320) device.mydevice.initComm() delay(30) endif delay(30) endwhile If not, I could pull one channels (in the channel group) back into main and set the timing (I am doing this now because I know it works).
  9. ledbelly2142

    Problematic Modbustcp Device

    Perfect, Thank you!
  10. ledbelly2142

    Problematic Modbustcp Device

    Got good feedback from the vendor, recommended Device.xxxx.InitComm() similar to your recommendation. They are going the extra mile to help, very good support. It happens every day around the same time, windows update is off, no antivirus. The gateway is doing something, not DF. Is it wise to set up a sequence that would reinitiate a device every 300 or so seconds? I don't think it would take up too much resources. I have a cheap Moxa gateway that times out as well. When a device times out, DF will not reinitiate unless I write a sequence or alarm. Is there a good way to monitor a device(s) for timeouts, then automatically reinitiate them? I think timeout and portlocks are indiscriminate in the console, so I would need to reinitiate all my devices to make sure all the connections are up... not sure if that is too risky thing--if part of the network were down (which has happened during a power outage) a sequence like this would be continually reinitiating all devices. Which "may" cause a problem with simultaneous connections. I appreciate your help
  11. ledbelly2142

    Problematic Modbustcp Device

    I have a ModbusTCP device that appears to stop responding at 6:13am every day... but its not consistent. I have the device set up to run from a script to get channel data every 300 seconds. This device is a gateway and I have several sequences running separately to gather channel data. Can my multiple sequences cause a problem? When monitoring the comms channel for this device, the last line that appears is a good Rx line, then nothing. The general symptom error in the command line is a ModbusTCP port locks and timeouts. The device will accept multiple simultaneous connections. I have increased the time for this device to 1 sec in an attempt to reduce timeouts. To fix this, I restart DF. I can set the system to restart every day... but that is not an option I would like to rely on. What else can I check?
  12. ledbelly2142

    Calculating Equipment Runtim

    I am monitoring equipment through relays with an on=1 or off=0 value, I would like to use the channel array to determine how long (in seconds) the equipment (or relay) has been on. I am not sure where to start. Maybe a combination of GetTime and SeqAdd? There is an example of counting the uptime of a digital channel using Var. on page 95. Thanks
  13. I would like to use a sequence to write a value to a Modbus register. Using a component to write to a Modbus registry is straight forward, however, I would like to use an alarm that starts a sequence that changes registry values on a Modbus device. I have tried a couple of variations of the following: device.MyDevice.334 = 0 Watching my comm Monitor, I am not writing anything, so I have the syntax wrong. I have tried using different values for the channel number, e.g. 40334, etc.. What is the correct syntax in a sequence to write to a Modbus device registry? Thanks
  14. ledbelly2142

    Modbus Register And Bit Value

    That is right, my timing in the test channels were wrong. Thank you. So the [0][0] bit is LSB, would have taken me a while to figured that out. Cheers
  15. ledbelly2142

    Modbus Register And Bit Value

    Just reread the documentation, the bit order is from the LSB (least significant bit)... so the first relay (I think) should be Relay1.addvalue(bits[0][7]) Relay1.addvalue(bits[0][6]) but this does not work either. I have some formatting issue, the bit values seem random with -1, -0, 0, and 1.