I am trying to implement modbus RTU with function code 1 . The code i have written implemented for function code 3 . i will get proper response for function code 3. When i implemented for function code 1 i am getting invalid checksum response error.
The crc function is working fine . I have checked modscan32, excel sheet of simplymodbus website. Simply Modbus - Enron Modbus Function Code 01 - Read Boolean Variables[^]
There are lots of tools to create ISO image files on harddisk from a physical CD/DVD.
But are there drivers available (Windows 7 or 10) for reading a raw, physical CD/DVD, sector by sector (i.e. independent of any file system structure) into RAM, providing a driver interface so that software will see it as if it were a physical CD/ROM drive?
Alternately, but not as convenient for me: A driver making an ISO file appear as a physical drive rather than as an NTFS file. I don't need that permanent ISO image file, and waiting for it to be created will be a lot slower. (Actually, in my case, the RAM image could be built lazily: The application program could start immedately, and when the driver receives a request for a sector not yet read in, it could freeze the ongoing complete reading, serve the application by accessing the physical disk, and then return to the task of creating a RAM image of the complete disk.)
My PC, like most modern PCs today, has 16 Gbytes of RAM, so even a completely packed, two-layer DVD leaves between 6 and 7 GBytes RAM for other applications. If you need more, paging may throw out unused blocks to disk. Keeping a full DVD in RAM is perfectly realistic nowadays.
(In the good old days of DOS and 16+4 bit addressing, but RAM sizes were growing beyond 1 Mbyte, we did things like this with floppies: There was software to create a RAM disk in extended memory (who are old enough to remember LIM EMS? ). We created an 1.44 Mbyte RAM disk, copied in a entire floppy to it, in one go, track by track. If my memory is right, reading an entire track required two rotations, but after 154 rounds, for 77 tracks, the entire floppy was available thousands of times faster than reading the physical unit.
The problem today is not the ISO image file; I can write my own software to access every block in that image. Some other tools read from CD/DVD interfaces, rather than from the NTFS file system, or they provide other functions when reading from a physical drive. So I need a driver to fool them to believe that either an ISO file, or preferably, a RAM image of a disk, really is a physical drive, providing all those operations a physical drive offer, but at RAM speeds.
I've got data on a DVD disk - or rather: A number of them. I've got an analysis program reading the data on the disks, but it will read from a physical disk only. It will not read from a disk file, neither on flash nor magnetic disks.
I do not produce the data; I receive and analyze them. It is more or less a one-time operation. Even if I could make an ISO file before I start the analysis, as soon as the analysis is done, I would delete the ISO file; I would not retain it, neither on a magnetic or flash disk.
RAM access is a lot faster than even flash disks, even with the OS caching disk blocks accessed. But more important: Creating an ISO image file on a flash or magnetic disk as a precursor to the analysis takes time. Especially if the driver would let you start working immediately after the DVD disk has been inserted, essentially reading the data sequentially in the most efficient way but if you refer to data not yet read in would put the sequential reading on hold to serve your request before continuing, the total time from start to completion could be a lot less.
Those alternatives in the article you link to will do half the job: Putting data in RAM. But the other half is having it appear not as an NTFS or FAT disk, but as a physical device that can be read as a raw DVD disk, below the file system layer. None of the 12 alternatives claim to mimic a physical DVD interface, and will not be accessible to an analysis program that reads from such interfaces only.
This tool will let you mount image files of hard drive, cd-rom or floppy, and create one or several ramdisks with various parameters. This all-in-one package includes the ImDisk Virtual Disk Driver (2.0.9), the DiscUtils library that extends the number of supported image file formats, and adds several GUIs and features.
(The "cd-rom" option includes "DVDs")
From there, there are virtual machines. If not, more "cpu" / threads.
Where you see obstacles, I see options.
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
OK, so I have a DVD-ROM from which I can create an image file, aka "ISO file", residing on my harddisk / flash disk. This image file I can mount as RAMdisk so that I can access the files on that DVD-ROM as if it was a physical NTFS or FAT file system.
The text you quote states that the ISO file may be an image of a hard drive (with an NTFS or FAT file system), or a CD-ROM (with an ISO 9660 file system or derivatives) or floppy (with a FAT file system). Although the file system within that image file reside in RAM structures, read in from a single file created from a harddisk, CD-ROM or floppy, it will appear to file system requests as if it was a disk with an NTFS, ISO 9660 or FAT file system, with directories and format restrictions etc.
I see no indication whatsoever in the description that it allows direct access to physical sectors, or that it support device control for emulating physical drives. If it did, I am quite sure that it would be seen in the documentation.
Maybe ImDisk - in the good old "if it doesn't do what you want, modify it yourself" Open Source style - can be modified to appear as a physical CD/DVD drive with no implied file system structure, but providing a raw access to the sectors, and reacting sensible to all control signals that might be sent to a physical CD/DVD drive. If my task were to write drivers, I could probably do that. I did write a few driver in the DOS days; I never did for Windows.
If you have tried using ImDisk yourself, using some DVD/CD software accessing the RAM image as a physical drive - e.g. trying to burn files to the RAM disk as a CD-RW disk, ejecting the disk, responding to drive capabilites etc. - then you know better than I do. But then you probably would not refer to a description of functionality that is not what I am after.
Sorry, I just thought you were stuck in the weeds.
Last time I looked at sectors, it was using "Norton Utilities" on DOS x.x ... and I cannot even remember why.
I guess that's why my mind is going blank listening to you explain why you need to operate at the "sector level" when there are better ways to spend one's time in relation to the current state of the art.
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
My main setup is a laptop, but I occasionally go on multi-day hiking trips or so and laptop is too big and it could get destroyed. I am thinking about getting a cheap 10 inch tablet that could make my days more productive.
My question is if are tablets any good for coding? If yes, then should I choose windows or just android? I know about online IDEs, but I might not always have an internet connection. I also own a Kindle reader so I expect more uses from a tablet.
I have a Chuwi Hi12, which is a dual boot Windows 10 / Android tablet.
Android for coding? Not a lot of fun. The keyboard is the main issue - if you use the swipe-to-type then it's predicts the wrong crap all the damn time, if you hunt and peck it still messes you up because it upper-cases and lower-cases at its own whim. So you end up working really slowly because you have to backtrack all the time and fix what you meant to type.
The windows side is OK , mostly - it's nowhere near as fast as a "proper" keyboard if only because it lacks tactile feedback, so if you have taken a touch typing course expect some pain. But ... Visual studio works on it, and not too badly. Slower compilation than my desktop, but you expect that, and most of your time is spent editing code anyway. The latest Windows 10 keyboard is a PITA to an extent - SHIFT, CTRL, and ALT no longer stay on while you hole the key down, so highlighting multiple words is frustrating to say the least.
But yes, you can code on a Windows 10 tablet pretty effectively.
@randor had mentioned that I could take a look at the dump file to get more info.
However, at the time the DMP file got delete so I was unable to go further.
My machine rebooted and this time I still have the 997MB DMP file (which is crazy) and I opened it up with WinDbg.
Here's what I see...
I know it's a lot of info but just thought it might be interesting.
You can see that it looks like it is the PCI.sys driver that failed.
Reason I'm Mentioning This
I mention this out of interest and to see if anyone else has had a situation with their Win10 PC rebooting itself like this while not in use.
Just a discussion, not looking for an answer. I know better than to believe we would ever be able to run a cryptic thing like this down. This is the Way of Windows, a magical land where the magic often fails.
A driver has failed to complete a power IRP within a specific time.
Arg1: 0000000000000004, The power transition timed out waiting to synchronize with the Pnp subsystem.
Arg2: 000000000000012c, Timeout in seconds.
Arg3: ffffe680b6184040, The thread currently holding on to the Pnp lock.
Arg4: ffff87012fc7d910, nt!TRIAGE_9F_PNP on Win7 and higher
Implicit thread is now ffffe680`b6184040
SYSTEM_PRODUCT_NAME: Satellite S55t-B
BIOS_VENDOR: INSYDE Corp.
BASEBOARD_MANUFACTURER: Type2 - Board Vendor Name1
BASEBOARD_PRODUCT: Type2 - Board Product Name1
BASEBOARD_VERSION: Type2 - Board Version
DRVPOWERSTATE_SUBCODE: 4IMAGE_NAME: pci.sys
FAULTING_MODULE: fffff80b9ac70000 pci
CPU_MICROCODE: 6,3c,3,0 (F,M,S,R) SIG: 1E'00000000 (cache) 1E'00000000 (init)
BLACKBOXBSD: 1 (!blackboxbsd)
BLACKBOXPNP: 1 (!blackboxpnp)
ANALYSIS_SESSION_TIME: 03-17-2018 12:04:23.0467
ANALYSIS_VERSION: 10.0.17074.1002 amd64fre
ffff8701`2fc7d8d8 fffff800`3608fbc4 : 00000000`0000009f 00000000`00000004 00000000`0000012c ffffe680`b6184040 : nt!KeBugCheckEx
ffff8701`2fc7d8e0 fffff800`362c6916 : ffff8701`2fc7db10 ffffd680`92cce180 ffffd680`92cce180 000000e6`7551f100 : nt!PnpBugcheckPowerTimeout+0x60
ffff8701`2fc7d940 fffff800`35f58923 : ffffd680`92cce180 00000000`00000000 ffff8701`2fc7db18 00000000`00000000 : nt!PopBuildDeviceNotifyListWatchdog+0x16
ffff8701`2fc7d970 fffff800`35f599bd : 00000000`00000018 00000000`00000000 00000000`00252ac4 ffffd680`92cce180 : nt!KiProcessExpiredTimerList+0x153
ffff8701`2fc7da60 fffff800`3600cdfa : 00000000`00000001 ffffd680`92cce180 00000000`00000000 ffffd680`92cdc200 : nt!KiRetireDpcList+0x43d
ffff8701`2fc7dc60 00000000`00000000 : ffff8701`2fc7e000 ffff8701`2fc78000 00000000`00000000 00000000`00000000 : nt!KiIdleLoop+0x5a
STACK_COMMAND: .thread ; .cxr ; kb
OSNAME: Windows 10
OSEDITION: Windows 10 WinNt TerminalServer SingleUserTS Personal
OSBUILD_TIMESTAMP: 2018-03-01 00:36:55
In the symbols dialog. This helps a lot with reading the stack.
You can run !analyze -v in windbg command window (at the bottom) which will run a basic diagnostic.
So, the bug itself happens when a PC does a power transition, so awake to suspend, awake to sleep, or awake to powered off, or vice versa. ( This is the only time windows sends power IRPs (IO request packet) to the driver stacks.)
Is this what happened?
If not then the dump file you have relates to the restart after the first crash. And the size is normal, it is the entire memory written to file.
The system always overwrites memory.dmp with a new one if it crashes. However you can also get it to write a minidump. (system advanced start up and recovery). These files are much smaller, arent as useful of course, but are time stamped.
But, I would be very surprised if pci.sys held on to a power IRP, so it is either a false positive, or some other driver in the stack thats making pci.sys f*** up.
This is where the fun starts. Verifier.exe is a tool that can monitor drivers for bad behaviour. It can only manage two or three at a time. SO run it, select custom settings, select all the checks except code integrity, VM and low resource, and then select two or three non microsoft drivers.
Hopefully verifier will point out the bad driver and you can get rid of it, or try to find an update. (And there are many bad third party drivers out there. A heck of a lot)
The reason you often get false positives is that one driver can overwrite anothers memory. When the second driver runs, can be many hours later, it does something wrong because it is now using bad data, or a bad address, and it fails. But it isnt at fault, it is the first driver.
I'm finally taking the plunge into the hardware world, and found the well written tutorial here on CodeProject.com, FMBomb - A Beginner's Approach to Hardware Programming. Unfortunately, I have not been able to find the NS73M breakout board for sale anywhere. It seems to have been discontinued. Can anyone recommend an alternative board that would work for that project?
EDIT: I stumbled upon this board. Anyone know if this board would be suitable?
This came up a potential abuse, but I think it's innocent in this case. I've removed your link, because it looks very spammy - and if left, you would probably be tagged as a spammer very quickly, and banned from the site.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!
I have the Alexa app on my IPad, Sony Bravia TV with Alexa setup app, and Echo Dot. I follow all the steps to setup. When I attempt to link Google & Amazon accounts via the Bravia TV Remote app it fails and I get an error screen. Everything seems to be in order. I tried whatever I could find with a search without success. I appreciate any help or good reference to get them connected.
I have a problem in installing Internet Printer programmatically with username and password.
I am able to install Printer using the following command:
rundll32 printui.dll,PrintUIEntry /if /b "Printername" /f %windir%\inf\ntprint.inf /r "https://username:email@example.com/printers/Printername"; /m "HP Color LaserJet 2500 PS Class Driver"
But Windows is not recognizing credentials. Hence I cant Print. I get Access denied message.
Is there any option to achieve this programmatically?
Any help will be greatly appreciated.
Last Visit: 31-Dec-99 19:00 Last Update: 8-Feb-23 17:36