News:

  • May 01, 2026, 09:24:32 PM

Login with username, password and session length

Author Topic: Questions about BRX?  (Read 164036 times)

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6154
  • Yes Pinky, Do-more will control the world!
Re: Questions about BRX?
« Reply #45 on: March 16, 2017, 06:08:15 PM »
I wondered what that was!

Didn't know it had been made an option. Should default to 'on'.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

mhw

  • Hero Member
  • *****
  • Posts: 250
Re: Questions about BRX?
« Reply #46 on: March 16, 2017, 06:31:09 PM »
Quote
The POM is just shown online for status purposes. All of the required configuration is always there regardless of whether there is one installed or not. Is there something you are trying to do that you are unable to?
I just thought it would pop in an image like it does with the expansion modules. That way a year from now I can look at my dashboard and see which POM was installed.
 
Quote
I wondered what that was!
Thanks, I guess I must have unchecked it when I was setting my preferences.

Evilbeard

  • Hero Member
  • *****
  • Posts: 160
Re: Questions about BRX?
« Reply #47 on: March 19, 2017, 08:59:53 AM »
Question about the file system instructions. Say you wanted to do a running average like the simple example I attached. Rather than counting and moving data, would it be possible to just pull a chunk of data points out of a log file, do the math, step forward one row, pull another chunk, do the math, lather, rinse, repeat?

Certainly.

I was wondering about this, how does one pull data from the log files?

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6154
  • Yes Pinky, Do-more will control the world!
Re: Questions about BRX?
« Reply #48 on: March 19, 2017, 09:22:52 AM »
I was wondering about this, how does one pull data from the log files?

Programmatically? Or externally?

If external, check out Do-more Designer's File System Browser.

If programmatically, there is a complete instruction set for managing files.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Evilbeard

  • Hero Member
  • *****
  • Posts: 160
Re: Questions about BRX?
« Reply #49 on: March 19, 2017, 09:35:56 AM »
I was wondering about this, how does one pull data from the log files?

Programmatically? Or externally?

If external, check out Do-more Designer's File System Browser.

If programmatically, there is a complete instruction set for managing files.

I was just curious, I'm working with logging now. Say, I'm logging the amount of runtime on a certain shift (which is recorded in the program to location D0), and I wanted to get the last 10 instances of D0 and average them. How do I tell the program to find those 10 instances of D0?

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6154
  • Yes Pinky, Do-more will control the world!
Re: Questions about BRX?
« Reply #50 on: March 19, 2017, 10:11:05 AM »
I was just curious, I'm working with logging now. Say, I'm logging the amount of runtime on a certain shift (which is recorded in the program to location D0), and I wanted to get the last 10 instances of D0 and average them. How do I tell the program to find those 10 instances of D0?

Cool. You would use FILEOPEN to open the file, FILESEEK to move the file pointer to the part of the file you want to read, FILEREAD to read the part you want, and then CLOSE the file.

The file API is very generalized to make it possible to do anything. We also have a very simplified FILELOG instruction for super easy logging.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Evilbeard

  • Hero Member
  • *****
  • Posts: 160
Re: Questions about BRX?
« Reply #51 on: March 19, 2017, 10:20:50 AM »
I was just curious, I'm working with logging now. Say, I'm logging the amount of runtime on a certain shift (which is recorded in the program to location D0), and I wanted to get the last 10 instances of D0 and average them. How do I tell the program to find those 10 instances of D0?

Cool. You would use FILEOPEN to open the file, FILESEEK to move the file pointer to the part of the file you want to read, FILEREAD to read the part you want, and then CLOSE the file.

The file API is very generalized to make it possible to do anything. We also have a very simplified FILELOG instruction for super easy logging.

Yes, I'm toying with FILELOG right now. I'm not currently on a BRX, I'm doing it on my DM1E that I've updated the firmware on. I'm working on logging the data, but without an SD card, I have to have it do something when it starts to run short on storage. I'm trying to make it email me when the available space reaches a certain point, attaching the file and then deleting it. I'm just waiting on IT to give me an email address for the machine. It's a bit of the corporate runaround.

I'm going to play with manipulating the data next.

Greg

  • HostTech
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 702
  • Hmmm...
    • Host Engineering, Inc.
Re: Questions about BRX?
« Reply #52 on: March 22, 2017, 10:59:23 AM »
@Evilbeard, it might benefit you to look at the File System Training Slides for BRX.

http://www.hosteng.com/FAQFiles/BRXTraining/BRXTechTrainingSlides.html
There are two types of people in the world; those that can extrapolate from incomplete data sets.

racrowd

  • Full Member
  • ***
  • Posts: 23
Re: Questions about BRX?
« Reply #53 on: March 24, 2017, 09:04:34 AM »
So, Could the FILEOPEN command be used to open a file on the network drive?  If it is possible, could you provide a quick example of what this would look like?

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3806
    • Host Engineering
Re: Questions about BRX?
« Reply #54 on: March 24, 2017, 09:14:21 AM »
So, Could the FILEOPEN command be used to open a file on the network drive?  If it is possible, could you provide a quick example of what this would look like?
No.  FILEOPEN can only reference files within the PLC itself, either on the PLC's RAM Drive (@RamFS) or the SD Card (@SDCardFS).

If you want to LOG data to a PC, you can do that using the DmLogger Window's application that is installed with Designer, and use STREAMOUT instruction with @DmLogger "device".

If you need to READ data or do more complex file I/O, you would have to implement a protocol to reference data on a PC/Server, which can be done using the Do-mores Ethernet TCP and/or UDP instructions, and some kind of software running on the PC/Server.  Many users have done this.  I would recommend you create a new topic with some details of what you are looking for.  Many users can help you down that path.

racrowd

  • Full Member
  • ***
  • Posts: 23
Re: Questions about BRX?
« Reply #55 on: March 24, 2017, 09:25:59 AM »
So, Could the FILEOPEN command be used to open a file on the network drive?  If it is possible, could you provide a quick example of what this would look like?
No.  FILEOPEN can only reference files within the PLC itself, either on the PLC's RAM Drive (@RamFS) or the SD Card (@SDCardFS).

If you want to LOG data to a PC, you can do that using the DmLogger Window's application that is installed with Designer, and use STREAMOUT instruction with @DmLogger "device".

If you need to READ data or do more complex file I/O, you would have to implement a protocol to reference data on a PC/Server, which can be done using the Do-mores Ethernet TCP and/or UDP instructions, and some kind of software running on the PC/Server.  Many users have done this.  I would recommend you create a new topic with some details of what you are looking for.  Many users can help you down that path.
I was just trying to grasp the capability.  I've used the file command with the dmlogger to log to csv file.  It works well and is really simple.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6154
  • Yes Pinky, Do-more will control the world!
Re: Questions about BRX?
« Reply #56 on: March 24, 2017, 10:49:58 AM »
So, Could the FILEOPEN command be used to open a file on the network drive?  If it is possible, could you provide a quick example of what this would look like?

That would be incredibly cool though! The DM1x runs bare metal (no OS) so the facilities to do such things don't exist.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Evilbeard

  • Hero Member
  • *****
  • Posts: 160
Re: Questions about BRX?
« Reply #57 on: March 24, 2017, 02:47:47 PM »
@Evilbeard, it might benefit you to look at the File System Training Slides for BRX.

http://www.hosteng.com/FAQFiles/BRXTraining/BRXTechTrainingSlides.html

I mean, I understand the theories, I just was curious to the limits/capabilities of these additions.

I guess the biggest thing I don't get is, how do I read the data points from the log file. I guess I don't grasp the pointer and how it functions.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6154
  • Yes Pinky, Do-more will control the world!
Re: Questions about BRX?
« Reply #58 on: March 24, 2017, 03:01:08 PM »
I guess the biggest thing I don't get is, how do I read the data points from the log file. I guess I don't grasp the pointer and how it functions.

The output of FILELOG really isn't optimized for a PLC program, it's optimized for a spreadsheet or other PC based app. If you are wanting to log things internally, and then access that log to read values back in and act on them, it might be easier to go a different direction. Maybe you could give us a little more detail of what you are wanting to do, and we can give you some guidance.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Evilbeard

  • Hero Member
  • *****
  • Posts: 160
Re: Questions about BRX?
« Reply #59 on: March 25, 2017, 12:25:33 PM »
I guess the biggest thing I don't get is, how do I read the data points from the log file. I guess I don't grasp the pointer and how it functions.

The output of FILELOG really isn't optimized for a PLC program, it's optimized for a spreadsheet or other PC based app. If you are wanting to log things internally, and then access that log to read values back in and act on them, it might be easier to go a different direction. Maybe you could give us a little more detail of what you are wanting to do, and we can give you some guidance.

Well, I was just thinking about a few possibilities. For instance, I have a machine. It calculates the amount of time (in minutes) the machine runs per shift, the total production during that shift, and the average production (total production/minutes ran). I was going to make the log write those values to a file. So, if I'm writing those logs to a file anyway, I figured I could use the last 5/10 values or so to produce weekly averages, without having to write the daily values to memory locations and then calculate it.